assert_valid_variable function

Check variables in a data frame are valid character or factor.