Remove unnecessary instance_of? check