Throw TypeErrors when options aren't correct.