Throws if the given value is nullish, otherwise returns it.
The generic type of the value being tested.
The value which could possibly be nullish.
The (optional) name of the value, to include in the thrown error message.
The value, once it has been confirmed it is not nullish.
Throws if the given value is nullish, otherwise returns it.