When checking if a document or index exist, don't return an error when the document or index is absent

Sorry this pull request was made from my master branch, which was a mistake.