def empty_dropper(item):
    """Used for list/dict types that may contain empty strings

    Recurses over the lists and dicts, replacing '' with None values"""
    if isinstance(item, dict):
        return {k: empty_dropper(v) for k, v in item.items()}
    elif isinstance(item, list):
        return [empty_dropper(v) for v in item if v != '']
    elif item == '':
        return
    return item