def check_list(in_lst, dtype=str):
    """Helper function to ensure input is a list of correct data type."""

    assert isinstance(in_lst, (list, dtype, tuple))

    if isinstance(in_lst, list):
        for itm in in_lst:
            assert isinstance(itm, dtype)
    else:
        in_lst = [in_lst]

    return in_lst