doc.Result is what we want to check with null not doc