protected static function getFirstAndValidateType(NodeList $list, string $expectedType): Node
    {
        if ($list->count() !== 1) {
            throw new ParseException('More than one definition was found in the passed in schema.');
        }

        $node = $list[0];

        return self::validateType($node, $expectedType);
    }