Use instanceof instead of is_a()