Add test for TypeError.
Doc nit.