Python Test If Variable Is A Dataframe