public function convertCreatablePropertyTypes(array $data = null)
    {
        if (empty($data)) {
            return null;
        }

        $object = new CreatablePropertyTypes();
        $canCreate = [];
        foreach ($data[JSONConstants::JSON_CAP_CREATABLE_PROPERTY_TYPES_CANCREATE] ?? [] as $canCreateItem) {
            try {
                $canCreate[] = PropertyType::cast($canCreateItem);
            } catch (InvalidEnumerationValueException $exception) {
                // ignore invalid types
            }
        }

        $object->setCanCreate($canCreate);

        $object->setExtensions(
            $this->convertExtension(
                $data,
                JSONConstants::getCapabilityCreatablePropertyKeys()
            )
        );

        return $object;
    }