I think it would be more idiomatic to call to_s on tod_string rather than refuse to parse a non-string.