
### 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)
* @param attachments          KV pairs
     * @param needConvertHeaderKey convert flag
     */
    public static void convertAttachment(DefaultHttp2Headers headers,
                                         Map<String, Object> attachments,
                                         boolean needConvertHeaderKey) {
        if (attachments == null) {
            return;
        }
        Map<String, String> needConvertKey = new HashMap<>();
        for (Map.Entry<String, Object> entry : attachments.entrySet()) {
            String key = lruHeaderMap.get(entry.getKey());
            if (key == null) {
                final String lowerCaseKey = entry.getKey().toLowerCase(Locale.ROOT);
                lruHeaderMap.put(entry.getKey(), lowerCaseKey);
                key = lowerCaseKey;
            }
            if (TripleHeaderEnum.containsExcludeAttachments(key)) {
                continue;
            }
            if (needConvertHeaderKey && !key.equals(entry.getKey())) {
                needConvertKey.put(key, entry.getKey());
            }
            final Object v = entry.getValue();
            convertSingleAttachment(headers, key, v);
        }
        if (!needConvertKey.isEmpty()) {
            String needConvertJson = JsonUtils.toJson(needConvertKey);
            headers.add(TripleHeaderEnum.TRI_HEADER_CONVERT.getHeader(), TriRpcStatus.encodeMessage(needConvertJson));
        }