change it to an if(istype(new_mob))