Test for type errors.
Test invalid codes.
Fix error handling of unknown unicode points.