Then the problem seems to lie on the is_valid_uuid itself it seems.  Why don't we just replace is_valid_uuid code with

try:
    val = uuid.UUID(value)
 except ValueError:
    return False
return True