public static boolean isFolderOrSystem(final DocRef docRef) {
        return docRef != null && (FOLDER_TYPE.equals(docRef.getType())
                                  || GitRepoDoc.TYPE.equals(docRef.getType())
                                  || Objects.equals(SYSTEM_DOC_REF, docRef));
    }
Tests whether a {@link DocRef} is a folder or the system node
stroom-core-shared/src/main/java/stroom/explorer/shared/ExplorerConstants.java