check that indexes exist