> if the someone pass a null value as the type argument of getConsole() function

See comment below. Is `null` a valid input to `getConsole`? If not, we should be throwing an error long before we get here, I'd say?