I'm seeing quite a few of these in prod:

```
java.lang.NullPointerException: Cannot invoke "org.elasticsearch.xpack.core.transform.transforms.TransformState.getTaskState()" because "transformState" is null
    at org.elasticsearch.xpack.transform.TransformUsageTransportAction.masterOperation(TransformUsageTransportAction.java:106) ~[?:?]
    at org.elasticsearch.xpack.transform.TransformUsageTransportAction.masterOperation(TransformUsageTransportAction.java:55) ~[?:?]
    at org.elasticsearch.action.support.master.TransportMasterNodeAction.executeMasterOperation(TransportMasterNodeAction.java:124) ~[elasticsearch-8.9.0.jar:?]
    at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.lambda$doStart$3(TransportMasterNodeAction.java:235) ~[elasticsearch-8.9.0.jar:?]
    at org.elasticsearch.action.ActionRunnable$3.doRun(ActionRunnable.java:72) ~[elasticsearch-8.9.0.jar:?]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983) ~[elasticsearch-8.9.0.jar:?]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) ~[elasticsearch-8.9.0.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
    at java.lang.Thread.run(Thread.java:1623) ~[?:?]
```

`org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask#getState` is declared `@Nullable` but this case is not handled properly by the usage action.
x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/TransformUsageTransportAction.java
long totalTransforms = transformCountSuccess.getHits().getTotalHits().value;
            if (totalTransforms == 0) {
                var usage = new TransformFeatureSetUsage(transformsCountByState, Collections.emptyMap(), new TransformIndexerStats());
                listener.onResponse(new XPackUsageFeatureResponse(usage));
                return;
            }
            transformsCountByState.merge(TransformTaskState.STOPPED.value(), totalTransforms - taskCount, Long::sum);
            transformsCountByFeature.set(getFeatureCounts(transformCountSuccess.getAggregations()));
            TransformInfoTransportAction.getStatisticSummations(client, totalStatsListener);
        }, transformCountFailure -> {
            if (transformCountFailure instanceof ResourceNotFoundException) {
                TransformInfoTransportAction.getStatisticSummations(client, totalStatsListener);
            } else {
                listener.onFailure(transformCountFailure);
            }
        });
        SearchRequest totalTransformCountSearchRequest = client.prepareSearch(
            TransformInternalIndexConstants.INDEX_NAME_PATTERN,
            TransformInternalIndexConstants.INDEX_NAME_PATTERN_DEPRECATED
        )
            .setTrackTotalHits(true)
            
            .setSize(0)
            .setFetchSource(false)
            .setQuery(
                QueryBuilders.constantScoreQuery(
                    QueryBuilders.boolQuery()
                        .filter(QueryBuilders.termQuery(TransformField.INDEX_DOC_TYPE.getPreferredName(), TransformConfig.NAME))
                )
            )