def col_isobj(df, col_name = None):
    """ Returns a list of columns that are of type object. If col_name is specified, returns 
    whether the column in the DataFrame is of type 'object' instead.
    Parameters:
    df - DataFrame
        DataFrame to check
    col_name - string, default None
        If specified, this function will True if df[col_name] is of type 'object'
    """
    col_list = df.select_dtypes(include = 'object').columns
    if col_name is None:
        return col_list
    else:
        return col_name in col_list
Returns a list of columns that are of type object. If col_name is specified, returns 
    whether the column in the DataFrame is of type 'object' instead.
    Parameters:
    df - DataFrame
        DataFrame to check
    col_name - string, default None
        If specified, this function will True if df[col_name] is of type 'object'