Add method checking if index exists