Checks if the assertion passes or if the value is undefined.

const maybeString = optional(string);

maybeString(1); // Error: type
maybeString("hello"); // passes
maybeString(undefined); // passes