Fixed typeof checks.