code: func (dec *Decoder) isCustomType() (bool, error) {
  	if dec.customTypes == nil {
  		return false, nil
  	}
  	if v, ok := dec.customTypes[dec.curr.Type()]; ok {
  		if len(v.fields) > 0 {
  			for i := range v.fields {
  				// check if the current field is registered
  				// in the fields of the custom type
  				if v.fields[i].field.Elem() == dec.curr {
  					va, err := v.fields[i].fun(dec.values)
  					if err != nil {
  						return true, err
  					}
  					dec.curr.Set(reflect.ValueOf(va))
  					return true, nil
  				}
  			}
  		}
  		// check if the default function exists for fields not specific
  		if v.fun != nil {
  			va, err := v.fun(dec.values)
  			if err != nil {
  				return true, err
  			}
  			dec.curr.Set(reflect.ValueOf(va))
  			return true, nil
  		}
  	}
  	return false, nil
  }
docs: // isCustomType checks if the field's type to decode has a custom type registered