if ((value instanceof String) == false || value == null) { return value;
if ((submittedValue instanceof String) == false) { return submittedValue;
    public static Object convertStringToValue(FacesContext context,            UIComponent component, Converter converter, Object value,            String attributeName) {        if ((value instanceof String) == false || value == null) {            return value;        }        if (converter == null) {            ValueBinding valueBinding = component                    .getValueBinding(attributeName);            if (valueBinding == null) {                return value;            }            if (valueBinding.getValue(context) != null) {                Class converterType = valueBinding.getType(context);                if (converterType == null || converterType == String.class                        || converterType == Object.class) {                    return value;                }                try {                    Application application = context.getApplication();                    converter = application.createConverter(converterType);                } catch (Exception e) {                    throw new FacesException(                            "Can not create converter for type '"                                    + converterType + "'.", e);                }            }        }        if (converter != null) {            return converter.getAsObject(context, component, (String) value);        }        return value;        // throw new ConverterException("No converter !");    }