Remove erroneous parens around typeof.
Just check against null, rather than undefined.