public static SafeHtml getSafeHtml(final String string) {
        if (NullSafe.isBlankString(string)) {
            return SafeHtmlUtils.EMPTY_SAFE_HTML;
        } else {
            return SafeHtmlUtils.fromString(string);
        }
    }
Null safe way to escape string and return {@link SafeHtml}
stroom-core-client-widget/src/main/java/stroom/widget/util/client/SafeHtmlUtil.java