Refactored quantile numerical classification to consider empty data.