Move instanceof check