is_category function

Test and validate if an object is a categorical variable.