fromText package:uuid-types

If the passed in Text can be parsed as an ASCII representation of a UUID, it will be. The hyphens may not be omitted.