Type-check helper method that checks the specified parameter for null or undefined and throws an exception when the value is null or undefined or returns the specified value if it is not null.
Value ot check
Optional error message to throw when the value is null
Type-check helper method that checks the specified parameter for null or undefined and throws an exception when the value is null or undefined or returns the specified value if it is not null.