private static String getStringValue(final Object object, Boolean ignoreCase) {
        if (object == null) {
            return null;
        } else {
            return switch (object) {
                case NodeInfo nodeInfo -> clean(nodeInfo.getStringValue(), ignoreCase);
                case String str -> clean(str, ignoreCase);
                default -> object.toString();
            };
        }
    }
@return value as a string, trimmed and, if ignoreCase is true, converted to lower case
stroom-pipeline/src/main/java/stroom/pipeline/filter/SAXEventRecorder.java