protected function getFormObjectArgument()
    {
        $objectArgument = $this->arguments['object'];

        if (null === $objectArgument) {
            return null;
        }

        if (false === is_object($objectArgument)) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueType($objectArgument);
        }

        if (false === $objectArgument instanceof FormInterface) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueObjectType($objectArgument);
        }

        $formClassName = $this->getFormClassName();

        if (false === $objectArgument instanceof $formClassName) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueClassName($formClassName, $objectArgument);
        }

        return $objectArgument;
    }