checks that an index is within min_index to max_index, not necessarily 0 to max_index