protected function validateNodeType(string $nodeType): string
    {
        if (!in_array($nodeType, static::$validNodeTypes)) {
            throw new \InvalidArgumentException(
                "invalid value node type '$nodeType'; expecting ".
                \sndsgd\Arr::implode(", ", static::$validNodeTypes, "or ")
            );
        }
        return $nodeType;
    }