typeof changed with instanceof