do a typeof check