Handle case CategoryImpl.pathInTree is null.
Move AttributeDefinition::findByName to ProductType as default method, close #29.