Added uniqueness validation to category and type