Simplify type test