public function convertToDatabaseValue($value, $marshal = true)
    {
        $converted = $value !== null ? $this->databaseValue($value) : null;

        if (!$marshal) {
            return $converted;
        }

        return $converted === null ? self::getNull() : [static::$dynamoKey => $converted];
    }