def check_if_nested(data):
    """Check whether a data structure contains lists/dicts."""
    if isinstance(data, dict):
        for k in data:
            if isinstance(data[k], (list, dict)):
                return True
    elif isinstance(data, list):
        for i in data:
            if isinstance(i, (list, dict)):
                return True
    return False