public static <T_ROW, T_FIELD> FilterFieldMapper<T_ROW> of(
            final FilterFieldDefinition fieldDefinition,
            final Function<T_ROW, T_FIELD> function1,
            final Function<T_FIELD, String> function2) {

        final Function<T_ROW, String> valueExtractor = row -> {
            final String result;
            if (row != null) {
                T_FIELD fieldVal = function1.apply(row);
                if (fieldVal != null) {
                    result = function2.apply(fieldVal);
                } else {
                    result = null;
                }
            } else {
                result = null;
            }
            return result;
        };
        return new FilterFieldMapper<>(fieldDefinition, valueExtractor);
    }
Overloaded factory method that allows you to define a nested value
extractor that is null safe. The value of each function is chained
in a null safe way.
stroom-util/src/main/java/stroom/util/filter/FilterFieldMapper.java