fix typeof undefined checks; typeof always returns strings
Merge pull request #3 from mwcz/typeof-undefined-fix

fix typeof undefined checks; typeof always returns strings