Add String.valid?

Added `String.valid?` and fixed `String.valid_codepoint?` tests.