js typeof is weak