Fixed to_valid_string() helper function.
Removed string validations.