Use Number.isNaN(number) instead of Object.is(number, NaN)