(Photo: Nouveau Variation by Syntopia)
if (root.Foo === undefined)
If I want to test if something is defined I do it like this.
if (root.Bar !== undefined)
if (typeof(foo) != "undefined")