code: func (f filter) checkValType(value interface{}) error {
  	// Here we iterate through pointer indirections. This is so you can
  	// just pass in a primitive instead of a pointer to a primitive for
  	// filtering on fields which have pointer values.
  	valueType := reflect.TypeOf(value)
  	valueVal := reflect.ValueOf(value)
  	for valueType.Kind() == reflect.Ptr {
  		valueType = valueType.Elem()
  		valueVal = valueVal.Elem()
  		if !valueVal.IsValid() {
  			return errors.New("zoom: invalid value for Filter. Is it a nil pointer?")
  		}
  	}
  	// Also dereference the field type to reach the underlying type.
  	fieldType := f.fieldSpec.typ
  	for fieldType.Kind() == reflect.Ptr {
  		fieldType = fieldType.Elem()
  	}
  	if valueType != fieldType {
  		return fmt.Errorf("zoom: invalid value for Filter on %s: type of value (%T) does not match type of field (%s)", f.fieldSpec.name, value, fieldType.String())
  	}
  	return nil
  }
docs: // checkValType returns an error if the type of value does not correspond to
  // filter.fieldSpec.