code: func isValidHandler(vfn reflect.Value, ctxType reflect.Type, types ...reflect.Type) bool {
  	fnType := vfn.Type()
  
  	if fnType.Kind() != reflect.Func {
  		return false
  	}
  
  	typesStartIdx := 0
  	typesLen := len(types)
  	numIn := fnType.NumIn()
  	numOut := fnType.NumOut()
  
  	if numOut != 0 {
  		return false
  	}
  
  	if numIn == typesLen {
  		// No context
  	} else if numIn == (typesLen + 1) {
  		// context, types
  		firstArgType := fnType.In(0)
  		if firstArgType != reflect.PtrTo(ctxType) && firstArgType != emptyInterfaceType {
  			return false
  		}
  		typesStartIdx = 1
  	} else {
  		return false
  	}
  
  	for _, typeArg := range types {
  		if fnType.In(typesStartIdx) != typeArg {
  			return false
  		}
  		typesStartIdx++
  	}
  
  	return true
  }
docs: // Ensures vfn is a function, that optionally takes a *ctxType as the first argument, followed by the specified types. Handlers have no return value.
  // Returns true if valid, false otherwise.