Safe conversions between textual types
