Prevent onPropertyChanged being triggered if both values are NaN

See commit for details.