public function convertTypeMutability(array $data = null)
    {
        if (empty($data)) {
            return null;
        }
        $typeMutability = new TypeMutability();
        $typeMutability->populate(
            $data,
            array_combine(
                JSONConstants::getTypeTypeMutabilityKeys(),
                array_map(
                    function ($key) {
                        // add a prefix "can" to all keys as this are the property names
                        return 'can' . ucfirst($key);
                    },
                    JSONConstants::getTypeTypeMutabilityKeys()
                )
            ),
            true
        );

        $typeMutability->setExtensions(
            $this->convertExtension($data, JSONConstants::getTypeTypeMutabilityKeys())
        );

        return $typeMutability;
    }