code: protected static Object coerceToSupportedType(Object value) {
          if (value == null) {
              return ""; // # empty string rather than null
          } else if (value instanceof Map) {
              Map valueAsMap = ((Map) value);
              if (valueAsMap.containsKey("*")) {
                  return valueAsMap.get("*");
              } else if (valueAsMap.containsKey("__default__")) {
                  return valueAsMap.get("__default__");
              } else {
                  return s_gson.toJson(valueAsMap);
              }
          } else if (value instanceof Float) {
              return new BigDecimal((float) value);
          } else if (value instanceof Double) {
              return new BigDecimal((double) value);
          } else if (value instanceof Long) {
              return new BigDecimal((long) value);
          } else {
              return value;
          }
      }
docs: Since we let users populate the context with whatever they want, this ensures the resolved value is something
  which the expression engine understands.
  @param value the resolved value
  @return the value converted to a supported data type