object type test in JS