check_input function

Check that the input is a valid dataframe