Deal properly with missing values in factors
Basic inferMode implementation