code: public static void setFieldValue(Object object, Field field, Object value) throws IllegalArgumentException, BugError
    {
      Params.notNull(field, "Field");
  
      Class<?> type = field.getType();
      if(!type.equals(String.class) && value instanceof String) {
        value = ConverterRegistry.getConverter().asObject((String)value, type);
      }
      if(value != null && !Types.isInstanceOf(value, type)) {
        throw new BugError("Value |%s| is not assignable to field |%s|.", value.getClass(), field);
      }
  
      try {
        field.setAccessible(true);
        field.set(object, value);
      }
      catch(IllegalAccessException e) {
        throw new BugError(e);
      }
    }
docs: Set field value for object instance, or class if given object instance is null. This setter takes care to enable
  accessibility for private fields. Also it tries to adapt <code>value</code> to field type: if <code>value</code> is
  a string and field type is not, delegates {@link Converter#asObject(String, Class)}. Anyway, if <code>value</code>
  is not a string it should be assignable to field type otherwise bug error is thrown.
  
  @param object instance to set field value to or null,
  @param field reflective field,
  @param value field value, possible null.
  @throws IllegalArgumentException if <code>field</code> parameter is null.
  @throws ConverterException if attempt to convert string value to field type but there is no registered converted
  for that type.
  @throws BugError if value is not assignable to field type.