def category(self, category: Category):
     self.__category = None
     if category.isValid():
         self.__category = category
 def add(category: Category):
     if not CategoryData.exists(category.name) and category.isValid():
         CategoryData.categories[category.name] = category
         return True
     return False