Type check performed incorrectly