Fix #208. Prevent error message if histogramming NaNs