### 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 directly to a registered SNS application
    endpoint, without it being subscribed to a topic.
    See `ApplicationTopicPublisher` for more information about Application Endpoint publishing.
    """
    def _publish(self, context: SnsPublishContext, endpoint: str):
        message = self.prepare_message(context.message, endpoint)
        cache = context.store.platform_endpoint_messages.setdefault(endpoint, [])
        cache.append(message)
        if (
            config.LEGACY_SNS_GCM_PUBLISHING
            and get_platform_type_from_endpoint_arn(endpoint) == "GCM"
        ):
            self._legacy_publish_to_gcm(context, endpoint)
        
        
        
        
    def prepare_message(self, message_context: SnsMessage, endpoint: str) -> Union[str, Dict]: