Added test for non-unicode and NaN input