Add capability to throw TypeErrors