Fix hasProperty check