zut.parse_uuid_or_none

zut.parse_uuid_or_none(uuid: str, version: int = None)

Check if the given string is a valid UUID, if yes, return the UUID object, otherwise return None.