Add more input validation

I know it's a simple function but a test for ```validateCategoryInputs``` should probably be included to support our convention of having tests for all util functions we create. Also, if the function changes, the tests act as a good proxy for making sure nothing else is going to get f**ed up.