code: func convertTemplateRequestField(fieldName string, iface interface{}) (interface{}, error) {
  	switch val := iface.(type) {
  	case nil:
  		return nil, nil
  	case bool:
  		return val, nil
  	case float64:
  		if val == float64(int64(val)) {
  			return int64(val), nil
  		}
  	}
  
  	str := fmt.Sprintf("the %s field must be unspecified, a boolean, or "+
  		"a 64-bit integer", fieldName)
  	return nil, makeError(ErrInvalidType, str)
  }
docs: // convertTemplateRequestField potentially converts the provided value as
  // needed.