if (value == null) {
      return success(value, []);
    }
wraps a given checker, making the valid value nullable

By default, a value passed to nullable must match the checker spec exactly
when it is not null, or it will fail.

passing the `nullWithWarningWhenInvalid` enables gracefully handling invalid
values that are less important -- if the provided checker is invalid,
the new checker will return null.

For example:

```javascript
import {nullable, record, string} from 'refine';

const Options = object({
  // this must be a non-null string,
  // or Options is not valid
  filename: string(),

  // if this field is not a string,
  // it will be null and Options will pass the checker
  description: nullable(string(), {
    nullWithWarningWhenInvalid: true,
  })
})

const result = Options({filename: 'test', description: 1});

invariant(result.type === 'success');
invariant(result.value.description === null);
invariant(result.warnings.length === 1); // there will be a warning
```