Update tests for stricter APIs.
Make sure all string instances get length checks consistently.