public function getTypeFromObjectData(ObjectDataInterface $objectData)
    {
        if ($objectData->getProperties() === null || count($objectData->getProperties()->getProperties()) === 0) {
            return null;
        }

        $typeProperty = $objectData->getProperties()->getProperties()[PropertyIds::OBJECT_TYPE_ID];

        if (!$typeProperty instanceof PropertyId) {
            return null;
        }

        return $this->session->getTypeDefinition($typeProperty->getFirstValue());
    }