Fix bug Creating Controller - test interface_exists and trait_exists in getClass()