code: func normalize(i interface{}) (int, error) {
  	switch v := i.(type) {
  	case int:
  		return v, nil
  	case int32:
  		return int(v), nil
  	case int64:
  		return int(v), nil
  	case float32:
  		return int(v + 0.5), nil
  	case float64:
  		// We need this check here because NaN can be a float. Casting NaN to
  		// int results in a large negative number. Even after you add 0.5.
  		if math.IsNaN(v) {
  			return -1, fmt.Errorf("Could not normalize NaN %v", v)
  		}
  		return int(v + 0.5), nil
  	case string:
  		f, err := strconv.ParseFloat(v, 64)
  		if err != nil {
  			return -1, err
  		}
  		return normalize(f)
  	default:
  		return -1, fmt.Errorf("Could not normalize %q", v)
  	}
  }
docs: // normalize converts ints, floats and strings to rounded ints
  // It errors on other types and NaNs.