code: public static Float toFloat(Object o, Float defaultValue) {
  	if (o instanceof Float) return (Float) o;
  	if (defaultValue != null) return new Float(toFloatValue(o, defaultValue.floatValue()));
  
  	float res = toFloatValue(o, Float.MIN_VALUE);
  	if (res == Float.MIN_VALUE) return defaultValue;
  	return new Float(res);
      }
docs: cast a Object to a Float Object(reference type)
  
  @param o Object to cast
  @param defaultValue
  @return casted Float Object