BUG: Closes #3213. Throw TypeError instead of OverflowError