### 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 TopicPublisher is responsible for publishing SNS messages to a topic's subscription.
    This is the base class implementing the basic logic.
    Each subclass will need to implement `_publish` using the subscription's protocol logic and client.
    Subclasses can override `prepare_message` if the format of the message is different.
    """
    def publish(self, context: SnsPublishContext, subscriber: SnsSubscription):
        """
        This function wraps the underlying call to the actual publishing. This allows us to catch any uncaught
        exception and log it properly. This method is passed to the ThreadPoolExecutor, which would swallow the
        exception. This is a convenient way of doing it, but not something the abstract class should take care.
        Discussion here: https://github.com/localstack/localstack/pull/7267#discussion_r1056873437
        # TODO: move this out of the base class
        :param context: the SnsPublishContext created by the caller, containing the necessary data to publish the
        message
        :param subscriber: the subscription data
        :return:
        """
        try:
            self._publish(context=context, subscriber=subscriber)
        except Exception:
            LOG.exception(
                "An internal error occurred while trying to send the SNS message %s",
                context.message,
            )
            return
    def _publish(self, context: SnsPublishContext, subscriber: SnsSubscription):