Handle :invalid_codepoint as a return value from String.next_codepoint/1.