public static String nullIfEmpty(String attribute) {
        if (attribute.isEmpty())
            return null;
        else
            return attribute;
    }
Static methods for helping dom building

@author bratseth
config-model/src/main/java/com/yahoo/config/model/builder/xml/XmlHelper.java