Use instanceof instead of is_a() in Controller.php