Check that x is of type T and not undefined. If x is undefined, throw a RuntimeError with the optionally provided error code and message.
x
T
undefined
Optional
Check that
xis of typeTand notundefined. Ifxisundefined, throw a RuntimeError with the optionally provided error code and message.