Use strict (in)equality comparison operators for typeof

I also stripped the parentheses from the `typeof` calls, as that seemed cleaner to me, though I can easily modify all of them to use parentheses instead.