Introduce a ThrowTypeError function.