if (map == null && mls != null) {
if ((map == null || map.isEmpty()) && (mls != null && !mls.isEmpty())) {
        public HtmlComponent createComponent(Object object, Class type) {            MultiLanguageString mls = (MultiLanguageString) object;                        MetaSlotKey key = ((MetaSlot) getInputContext().getMetaObject()).getKey();            HtmlBlockContainer container = new HtmlBlockContainer();            // hidden field with real value            HtmlHiddenField hiddenField = new HtmlHiddenField();            hiddenField.setTargetSlot(key);            hiddenField.setController(new MultiLanguageStringController());            hiddenField.setConverter(getConverter());            container.addChild(hiddenField);                                   // add link            HtmlActionLink addLink = new HtmlActionLink(RenderUtils.getResourceString("renderers.language.add"));            addLink.setName(getLocalName("add"));            container.addChild(addLink);                        Map<Integer, LanguageBean> map = getLanguageMap(false);            if (map == null && mls != null) {                map = getLanguageMap(true);                                int index = 0;                for (Language language : mls.getAllLanguages()) {                    map.put(index++, new LanguageBean(language, mls.getContent(language)));                }            }                        HtmlActionLink firstRemoveLink = null;            HtmlActionLink secondRemoveLink = null;                        if (map != null) {                List<Map.Entry<Integer, LanguageBean>> list = new ArrayList<Map.Entry<Integer, LanguageBean>>(map.entrySet());                Collections.sort(list, new Comparator<Map.Entry<Integer, LanguageBean>>() {                    public int compare(Entry<Integer, LanguageBean> o1, Entry<Integer, LanguageBean> o2) {                        return o1.getKey().compareTo(o2.getKey());                    }                                    });                                for (Map.Entry<Integer, LanguageBean> entry : list) {                    HtmlActionLink link = addLanguageInput(container, entry.getKey(), entry.getValue().value, entry.getValue().language, list.size() > 1);                                        if (firstRemoveLink == null) {                        firstRemoveLink = link;                    }                    else if (secondRemoveLink == null) {                        secondRemoveLink = link;                    }                }            }            else {                // defaul: present one entry without allowing to remove                addLanguageInput(container, 0, "", null, false);            }            // setup controllers to avoid displaying the remove link when only one line is present            addLink.setController(new AddNewLanguageController(container, firstRemoveLink));            if (map != null && map.size() == 2) {                ((RemoveLanguageController) firstRemoveLink.getController()).setLink(secondRemoveLink);                ((RemoveLanguageController) secondRemoveLink.getController()).setLink(firstRemoveLink);            }                        return container;        }