### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

It seems that it is possible to receive sns message in an sqs listener if there is a filterpolicy in place for null value in a message attribute, and a message is being sent without the message attribute.

### Expected Behavior

Don't recieve these type of messages

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

`sns subscribe --topic-arn "demoTopicArn"  --protocol sqs --notification-endpoint "demoSqsEndpoint" --attributes '{"RawMessageDelivery": "true"}'`
`sns set-subscription-attributes --subscription-arn demoSubsArn --attribute-name FilterPolicy --attribute-value '{"testForNull": [null,{"anything-but": ["notgood"]}]}'`
`sns publish --topic-arn demoTopicArn --message "testforrecieval"`
`sqs receive-message --queue-url  "demoUrl"`

### Environment

```markdown
- OS: macOS 13.6
- LocalStack: 2.2.0
```


### Anything else?

_No response_
"""
    The application publisher is responsible for publishing the SNS message to a subscribed SNS application endpoint.
    The SNS application endpoint represents a mobile app and device.
    The application endpoint can be of different types, represented in `SnsApplicationPlatforms`.
    This is not directly implemented yet in LocalStack, we save the message to be retrieved later from an internal
    endpoint.
    The `LEGACY_SNS_GCM_PUBLISHING` flag allows direct publishing to the GCM platform, with some caveats:
    - It always publishes if the platform is GCM, and raises an exception if the credentials are wrong.
    - the Platform Application should be validated before and not while publishing
    See https://docs.aws.amazon.com/sns/latest/dg/sns-mobile-application-as-subscriber.html
    """
    def _publish(self, context: SnsPublishContext, subscriber: SnsSubscription):
        endpoint_arn = subscriber["Endpoint"]
        message = self.prepare_message(context.message, subscriber)
        cache = context.store.platform_endpoint_messages.setdefault(endpoint_arn, [])
        cache.append(message)
        if (
            config.LEGACY_SNS_GCM_PUBLISHING
            and get_platform_type_from_endpoint_arn(endpoint_arn) == "GCM"
        ):
            self._legacy_publish_to_gcm(context, endpoint_arn)
        
        
        store_delivery_log(context.message, subscriber, success=True)
    def prepare_message(