pet_comparison: handle NaN input