Convert categorical variables to factors and deal with empty/missing values
empty_level(x)
x
Categorical variable used in table
Variable with updated levels