check if ReflectionClass::getTraits() method exists