
### Environment

* Dubbo version: 3.2.0
* Operating System version: aws linux
* Java version: 17

###  issue

Meet exception when convert single attachment key:security_authentication_context value=null, dubbo version: 3.2.0, current host: 172.32.18.64, error code: 4-1. This may be caused by , go to https://dubbo.apache.org/faq/4/1 to find instructions.
--
java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "v" is null
at org.apache.dubbo.rpc.protocol.tri.stream.StreamUtils.convertSingleAttachment(StreamUtils.java:137)
at org.apache.dubbo.rpc.protocol.tri.stream.StreamUtils.convertAttachment(StreamUtils.java:107)
at org.apache.dubbo.rpc.protocol.tri.RequestMetadata.toHeaders(RequestMetadata.java:74)
at org.apache.dubbo.rpc.protocol.tri.call.TripleClientCall.sendMessage(TripleClientCall.java:173)
at org.apache.dubbo.rpc.protocol.tri.observer.ClientCallToObserverAdapter.onNext(ClientCallToObserverAdapter.java:44)
at org.apache.dubbo.rpc.protocol.tri.TripleInvoker.invokeUnary(TripleInvoker.java:247)
at org.apache.dubbo.rpc.protocol.tri.TripleInvoker.doInvoke(TripleInvoker.java:140)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.doInvokeAndReturn(AbstractInvoker.java:242)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:186)
at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:71)
at org.apache.dubbo.metrics.filter.MetricsFilter.invoke(MetricsFilter.java:51)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:194)
at org.apache.dubbo.rpc.protocol.ReferenceCountInvokerWrapper.invoke(ReferenceCountInvokerWrapper.java:78)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invokeWithContext(AbstractClusterInvoker.java:380)
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:81)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:341)
at org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter.invoke(RouterSnapshotFilter.java:46)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:101)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter.invoke(MetricsClusterFilter.java:51)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:52)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.spring.security.filter.ContextHolderParametersSelectedTransferFilter.invoke(ContextHolderParametersSelectedTransferFilter.java:41)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.spring.security.filter.ContextHolderAuthenticationPrepareFilter.invoke(ContextHolderAuthenticationPrepareFilter.java:47)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter.invoke(ConsumerClassLoaderFilter.java:40)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter.invoke(ConsumerContextFilter.java:118)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:331)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:194)
at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$ClusterFilterInvoker.invoke(AbstractCluster.java:91)
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:103)
at org.apache.dubbo.rpc.cluster.support.wrapper.ScopeClusterInvoker.invoke(ScopeClusterInvoker.java:131)
at org.apache.dubbo.registry.client.migration.MigrationInvoker.invoke(MigrationInvoker.java:284)
at org.apache.dubbo.rpc.proxy.InvocationUtil.invoke(InvocationUtil.java:57)
}
    public static void convertAttachment(DefaultHttp2Headers headers,
                                         Map<String, Object> attachments) {
        convertAttachment(headers, attachments, false);
    }
    /**
     * Convert each user's attach value to metadata
     *
     * @param headers outbound headers
     * @param key     metadata key
     * @param v       metadata value (Metadata Only string and byte arrays are allowed)
     */
    private static void convertSingleAttachment(DefaultHttp2Headers headers, String key, Object v) {
        try {
            if (v instanceof String || v instanceof Number || v instanceof Boolean) {
                String str = v.toString();
                headers.set(key, str);
            } else if (v instanceof byte[]) {
                String str = encodeBase64ASCII((byte[]) v);
                headers.set(key + TripleConstant.HEADER_BIN_SUFFIX, str);
            } else {
                LOGGER.warn(PROTOCOL_UNSUPPORTED, "", "", "Unsupported attachment k: " + key + " class: " + v.getClass().getName());
            }
        } catch (Throwable t) {
            LOGGER.warn(PROTOCOL_UNSUPPORTED, "", "", "Meet exception when convert single attachment key:" + key + " value=" + v,
                t);
        }
    }
}