Checks whether the supplied data is of Series type.

def is_series(data):
    """
    Checks whether the supplied data is of Series type.
    """
    dd = None
    if 'dask' in sys.modules:
        import dask.dataframe as dd
    return((pd is not None and isinstance(data, pd.Series)) or
          (dd is not None and isinstance(data, dd.Series)))