ClassAnalyzer::hasTrait returns false if not \ReflectionClass

This throws class type error otherwise. I have my own BaseEntity class and ->getParentClass() returns null, so this collapses.