code: func RegisterType(iri quad.IRI, obj interface{}) {
  	var rt reflect.Type
  	if obj != nil {
  		if t, ok := obj.(reflect.Type); ok {
  			rt = t
  		} else {
  			rt = reflect.TypeOf(obj)
  			if rt.Kind() == reflect.Ptr {
  				rt = rt.Elem()
  			}
  		}
  	}
  	full := iri.Full()
  	typesMu.Lock()
  	defer typesMu.Unlock()
  	if obj == nil {
  		tp := iriToType[full]
  		delete(typeToIRI, tp)
  		delete(iriToType, full)
  		return
  	}
  	if _, exists := typeToIRI[rt]; exists {
  		panic(fmt.Errorf("type %v is already registered", rt))
  	}
  	if _, exists := iriToType[full]; exists {
  		panic(fmt.Errorf("IRI %v is already registered", iri))
  	}
  	typeToIRI[rt] = iri
  	iriToType[full] = rt
  }
docs: // RegisterType associates an IRI with a given Go type.
  //
  // All queries and writes will require or add a type triple.