### Elasticsearch Version

8.2.0 (likely others)

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Cloud

### Problem Description

I saw a NPE in `MlAssignmentNotifier#auditMlTasks` which looks to be due to the `PersistentTasksCustomMetadata` being completely missing (i.e. `null`) rather than simply empty.

### Steps to Reproduce

Unknown

### Logs (if relevant)

```
[instance-0000000000] uncaught exception in thread [elasticsearch[instance-0000000000][generic][T#5]]
java.lang.NullPointerException: Cannot invoke "org.elasticsearch.persistent.PersistentTasksCustomMetadata.tasks()" because "currentTasks" is null
	at org.elasticsearch.xpack.ml.MlAssignmentNotifier.auditMlTasks(MlAssignmentNotifier.java:96) ~[?:?]
	at org.elasticsearch.xpack.ml.MlAssignmentNotifier.auditChangesToMlTasks(MlAssignmentNotifier.java:76) ~[?:?]
	at org.elasticsearch.xpack.ml.MlAssignmentNotifier.lambda$clusterChanged$0(MlAssignmentNotifier.java:64) ~[?:?]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:714) ~[elasticsearch-8.2.0.jar:8.2.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
```
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MlAssignmentNotifier.java
boolean alwaysAuditUnassigned
    ) {
        for (PersistentTask<?> currentTask : currentTasks.tasks()) {
            Assignment currentAssignment = currentTask.getAssignment();
            PersistentTask<?> previousTask = previousTasks != null ? previousTasks.getTask(currentTask.getId()) : null;
            Assignment previousAssignment = previousTask != null ? previousTask.getAssignment() : null;
            boolean isTaskAssigned = (currentAssignment.getExecutorNode() != null);
            if (Objects.equals(currentAssignment, previousAssignment) && (isTaskAssigned || alwaysAuditUnassigned == false)) {
                continue;
            }
            boolean wasTaskAssigned = (previousAssignment != null) && (previousAssignment.getExecutorNode() != null);
            if (MlTasks.JOB_TASK_NAME.equals(currentTask.getTaskName())) {
                String jobId = ((OpenJobAction.JobParams) currentTask.getParams()).getJobId();
                if (isTaskAssigned) {
                    String nodeName = nodeName(currentNodes, currentAssignment.getExecutorNode());
                    anomalyDetectionAuditor.info(jobId, "Opening job on node [" + nodeName + "]");
                } else if (alwaysAuditUnassigned) {
                    anomalyDetectionAuditor.warning(
                        jobId,
                        "No node found to open job. Reasons [" + currentAssignment.getExplanation() + "]"
                    );
                } else if (wasTaskAssigned) {
                    String nodeName = nodeName(previousNodes, previousAssignment.getExecutorNode());
                    anomalyDetectionAuditor.info(jobId, "Job unassigned from node [" + nodeName + "]");
                }
            } else if (MlTasks.DATAFEED_TASK_NAME.equals(currentTask.getTaskName())) {
                StartDatafeedAction.DatafeedParams datafeedParams = (StartDatafeedAction.DatafeedParams) currentTask.getParams();
                String jobId = datafeedParams.getJobId();
                if (jobId != null) {
                    if (isTaskAssigned) {