private function getTypeObject($type, $args)
    {
        /* @var AbstractType $object */
        if ($type instanceof AbstractType) {
            $object = $type;
        } else {
            $class = $this->getTypeClass($type);

            if (!\class_exists($class)) {
                $class = TextType::class;
            }

            $object = new $class($args, $this);
        }

        return $object;
    }