Specify call to isnan to resolve ambiguity