has_categories function

Test if an object has categorical variables.