code: public static <T> T toType(Class<T> type, Object value) {
  		T result = toNullableType(type, value);
  		if (result != null)
  			return result;
  
  		TypeCode resultType = toTypeCode(type);
  		if (resultType == TypeCode.String)
  			return null;
  		else if (resultType == TypeCode.Integer)
  			return type.cast((int) 0);
  		else if (resultType == TypeCode.Long)
  			return type.cast((long) 0);
  		else if (resultType == TypeCode.Float)
  			return type.cast((float) 0);
  		else if (resultType == TypeCode.Double)
  			return type.cast((double) 0);
  		else
  			return null;
  	}
docs: Converts value into an object type specified by Type Code or returns type
  default when conversion is not possible.
  
  @param type  the Class type for the data type into which 'value' is to be converted.
  @param value the value to convert.
  @return object value of type corresponding to TypeCode, or type default when
  conversion is not supported.
  
  @see TypeConverter#toNullableType(Class, Object)
  @see TypeConverter#toTypeCode(Class)