actually, since undefined can be redefined in browsers that this shim will work with (ES5-shimmed IE 8 and below, for example) the typeof approach is far superior imo.

Alternatively, we'd want to declare an undefined variable to compare to.