private static boolean contains(final Object value, final String text, final Boolean ignoreCase) {
        // Contains doesn't really make any sense for any type other than string, so just convert whatever it
        // is to a string and do contains on that.
        String valueStr = getStringValue(value, ignoreCase);

        if (valueStr == null || text == null) {
            return false;
        }

        String txt = text.trim();

        if (NullSafe.isTrue(ignoreCase)) {
            // getStringValue does the trim and toLowerCase for value/valueStr
            txt = text.toLowerCase();
        }
        return valueStr.contains(txt);
    }
@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