ClassAnalyzer::hasTrait returns false if $parentClass is NULL

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