added yet another NaN check (refs #499)