[FIX] JSlint warnings.
Simplify checks for undefined.