Make String.valid? work on characters