Returns a boolean indicating whether or not a given document exists.