JS type checker