In all the rest of our code base we throw `Error` instead of `TypeError` for this kind of scenario. I just kept it consistent. Should we change the other errors too?