only record document changes for non-null keys