Also works on lists if dataframes are contained as list elements.
emptify_object(x)
x
Dataframe or list.