FIX OneHotEncoder: check value max when n_values is integral

Fixes #2839.