new Date(NaN).toJSON() must return null instead of throwing a TypeError