correctly parse categorical data into null (when not categorical) the
number (when ordinal) and the category otherwise