Check for errors to determine if document was inserted instead of ok value