Prevents exception if the index doesnt exist.