Add is_open function to test whether an index correspond to an