yupでnumberだけどnullも許す感じでバリデーションしたいとき

cpoint-lab.co.jp React Hook Formとyupでフォームにバリデーションかけてます。 で、問題は、inputのtypeがnumberで、yupではnumber or nullでバリデーションかけたいとき。 yup.number() yup.number().nullable() だと、数字はいけますが、nullが入りません。 must be a `number` type, but the final value was: `NaN` …