def get_data(key, data, default=list()):
    """ Safely get the value of a key

    :param key: key to the data of interest
    :param data: dictionary holding the data
    :param default: what to return if the key is missing or empty
    :return: the value for `key` of default
    """

    if key in data:
        if data[key] is None:
            return default
        else:
            return data[key]
    else:
        return default