def convert_null_geometry_to_none(frame):
    """Utility method.  Convert any geometry in the geoDataFrame which is
    "null" (`None` or empty) to `None`.  The returned geoDateFrame is suitable
    for saving.
    """
    def null_to_none(x):
        if x is None or x.is_empty:
            return None
        return x
    newgeo = frame.geometry.map(null_to_none)
    return frame.set_geometry(newgeo)