protected function validateTypeCollection()
    {
        $field = 'type';

        if ($this->isExcluded($field) || $this->isUpdating()) {
            return null; // Do not check type on update - it cannot be changed and will be ignored
        }

        $value = $this->getSubmitted($field);
        $label = $this->translation->text('Type');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        $types = $this->collection->getTypes();

        if (!isset($types[$value])) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        return true;
    }