def find_null_idx(df, column=None):
    """returns the indices of null values found in the series/column.
    if df is a dataframe and column is none, it returns a dictionary
    with the column names as a value and  null_idx for each column as the values.
    Example Usage:
    1)
    >> null_idx = get_null_idx(series)
    >> series_null_removed = series[null_idx]
    2)
    >> null_dict = get_null_idx()
    """
    import pandas as pd
    import numpy as np
    idx_null = []
    if isinstance(df, pd.Series) and column is not None:
        raise Exception('If passing a series, column must be None')
    elif isinstance(df, pd.Series):
        series = df
        idx_null = series.loc[series.isna() == True].index
    elif isinstance(df, pd.DataFrame) and isinstance(column, str):
        series = df[column]
        idx_null = series.loc[series.isna() == True].index
    elif isinstance(df, pd.DataFrame):
        idx_null = {}
        if column is None:
            col_list = df.columns
        else:
            col_list = column
        for col in col_list:
            series = df[col]
            idx_null[col] = series.loc[series.isna() == True].index
    else:
        raise Exception('Input df must be a pandas DataFrame or Series.')
    return idx_null
