implement isValidCategory