Value must be a nonempty dictionary whose key is a valid dynamodb type
The following code fails with moto:

```python
import boto3
from moto import mock_aws

with mock_aws():
    dynamodb = boto3.resource(
        "dynamodb", region_name="us-east-1"
    )
    table = dynamodb.create_table(
        TableName="dummy",
        AttributeDefinitions=[
            {"AttributeName": "client", "AttributeType": "S"},
            {"AttributeName": "app", "AttributeType": "S"},
        ],
        KeySchema=[
            {"AttributeName": "client", "KeyType": "HASH"},
            {"AttributeName": "app", "KeyType": "RANGE"},
        ],
        ProvisionedThroughput={"ReadCapacityUnits": 123, "WriteCapacityUnits": 123},
    )
    table.update_item(
        Key={"client": "clientA", "app": "appB"},
        UpdateExpression=(
            "SET " "#items = list_append(:new_items, if_not_exists(#items, :empty))"
        ),
        ExpressionAttributeValues={
            ":empty": [],
            ":new_items": [
                b"\n\x014\x18\xc3\xb0\xf8\xba\x06",
                b"\n\x012\x18\xc3\xb0\xf8\xba\x06",
            ],
        },
        ExpressionAttributeNames={"#items": "items"},
        ReturnValues="UPDATED_NEW",
    )
```

Here is the error:
```
Traceback (most recent call last):
  File "<stdin>", line 17, in <module>
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/resources/factory.py", line 581, in do_action
    response = action(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/resources/action.py", line 88, in __call__
    response = getattr(parent.meta.client, operation_name)(*args, **params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/botocore/client.py", line 565, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/botocore/client.py", line 1003, in _make_api_call
    self.meta.events.emit(
  File "/home/denis/test/env/lib/python3.12/site-packages/botocore/hooks.py", line 412, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/botocore/hooks.py", line 256, in emit
    return self._emit(event_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/botocore/hooks.py", line 239, in _emit
    response = handler(**kwargs)
               ^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/transform.py", line 227, in inject_attribute_value_output
    self._transformer.transform(
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/transform.py", line 289, in transform
    self._transform_parameters(model, params, transformation, target_shape)
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/transform.py", line 296, in _transform_parameters
    getattr(self, f'_transform_{type_name}')(
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/transform.py", line 312, in _transform_structure
    self._transform_parameters(
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/transform.py", line 296, in _transform_parameters
    getattr(self, f'_transform_{type_name}')(
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/transform.py", line 326, in _transform_map
    params[key] = transformation(value)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/types.py", line 279, in deserialize
    return deserializer(value[dynamodb_type])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/types.py", line 306, in _deserialize_l
    return [self.deserialize(v) for v in value]
            ^^^^^^^^^^^^^^^^^^^
  File "/home/denis/test/env/lib/python3.12/site-packages/boto3/dynamodb/types.py", line 268, in deserialize
    raise TypeError(
TypeError: Value must be a nonempty dictionary whose key is a valid dynamodb type.
```

When I include the `endpoint_url` parameter to point to the locally running DynamoDB container:

```python
dynamodb = boto3.resource(
    "dynamodb",
    region_name="us-east-1",
    endpoint_url="http://localhost:8000"
)
```

It starts working. However, it seems that in this scenario, AWS mocking is bypassed.
```
{'Attributes': {'items': [Binary(b'\n\x014\x18\xc3\xb0\xf8\xba\x06'), Binary(b'\n\x012\x18\xc3\xb0\xf8\xba\x06')]}, 'ResponseMetadata': {'RequestId': '2f870e67-18fc-4d69-829e-4e96fabd6460', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'Jetty(12.0.8)', 'date': 'Sun, 15 Dec 2024 00:36:44 GMT', 'x-amzn-requestid': '2f870e67-18fc-4d69-829e-4e96fabd6460', 'content-type': 'application/x-amz-json-1.0', 'x-amz-crc32': '163102387', 'content-length': '74'}, 'RetryAttempts': 0}}
```


```
moto==5.0.22
```