How do I check if a Global field exists in a template?
That's a known issue with Twig's is defined test.  See here for an explanation and workarounds.

Note that this is no longer an issue in the upcoming Craft 3.