code: public static <T> T resolveValue(Object value, Class<T> type, ELContext elContext) {
  		if(value == null) {
  			return null;
  		} else if(value instanceof ValueExpression) {
  			return resolveValue((ValueExpression)value, type, elContext);
  		} else {
  			return type.cast(value);
  		}
  	}
docs: Casts or evaluates an expression then casts to the provided type.