public static boolean isSameDocument(final DocRef docRef, final Doc doc) {
        if (docRef == null || doc == null) {
            return false;
        } else {
            return Objects.equals(docRef.getUuid(), doc.getUuid())
                    && Objects.equals(docRef.getType(), doc.getType());
        }
    }
Return true if the docRef and doc have the same UUID and type.
If either is null, returns false.
stroom-core-shared/src/main/java/stroom/docstore/shared/DocRefUtil.java