More efficient Object.typeOf