A Berliner is someone from Berlin. And it is - outside of Berlin - a jelly doughnut. In Berlin, those jelly doughnuts are called Pfannkuchen, which elsewhere means "pancakes," which caused great confusion for yours truly when she moved to Berlin. However, the question remains: What did John F. Kennedy really say when he made his famous speech?
"Ich bin ein Berliner."
Usually, if you're going to say you're from Berlin, you'll say,
"Ich bin Berliner," or "Ich bin Berlinerin."
So it is fair to say that literally interpreted, and interpreted by non-Berliners, he proclaimed himself to be a jelly doughnut. But that's just if you're feeling nitpicky. And since Berliners don't call those jelly doughnuts Berliners anyway, it was a perfectly acceptable utterance in the place he made it.