Ich bin What? - NYTimes.com:
Contrary to popular myth, President Kennedy did not actually say (unintentionally), "I am a jelly doughnut" when he uttered his famous line in Berlin, "Ich bin ein Berliner."
Ja, there is a variety of jelly-filled doughnut known as a berliner. But despite the legend, the Berliners (note difference in case between "berliner" and "Berliner" - it is significant in German) who gathered to hear Kennedy that day in 1963 did not understand him to mean that, despite his use of the definite article, "ein." True, in hoch Deutsch, or "proper" German, the definite article is omitted before proper nouns. For example, I learned when I lived in Germany to say, "Ich bin Amerikanische offizier," not "ein Amerikanische offizier."
But that's the "King's German," so to speak. In fact, the city's residents in that day colloquially spoke so that to omit the definite article was to say one was a native-born Berliner, and to include it meant a non-native resident, or to be in solidarity with the people of the city.
Turns out that JFK's utterance of the phrase was accidentally correct, not accidentally wrong.