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.
Merge pull request #114 from TomasVotruba/patch-1

ClassAnalyzer::hasTrait returns false if $parentClass is NULL