import uuid


def is_uuid(data):
    """Check is data is a valid uuid. If data is a list,
    checks if all elements of the list are valid uuids"""
    temp = [data] if not isinstance(data, list) else data
    for i in temp:
        try:
            uuid.UUID(str(i), version=4)
        except ValueError:
            return False
    return True