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

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

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

For example:

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

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

  // this must be a string or undefined,
  // or Options is not valid
  displayName: voidable(string()),

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

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

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