prevent adding category if field is empty