import uuid


def is_string_uuid(val):
    """
    Checks if the given string is a valid UUID
    :param val: str
    :return: boolean
    """
    if val and isinstance(val, str):
        try:
            uuid.UUID(val)
            return True
        except ValueError:
            pass

    return False