Using instanceof instead of get_class