### Elasticsearch Version

master

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

all

### Problem Description

cat indices API in time_series mode is NPE, The reproduce steps is below:

### Steps to Reproduce

```
# step 1
PUT _index_template/test
{
  "index_patterns": [
    "test"
  ],
  "template": {
    "settings": {
      "index.routing_path": "foo"
    },
    "mappings": {
      "properties": {
        "foo": {
          "type": "keyword",
          "time_series_dimension": true
        }
      }
    }
  },
  "data_stream": {
    "index_mode": "time_series"
  }
}

# step 2
PUT _data_stream/test

# step 3
GET _cluster/state/metadata/test
GET _cat/indices/test?v
```
server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java
public DataStream rollover(Index writeIndex, long generation, IndexMode indexModeFromTemplate) {
        ensureNotReplicated();
        return unsafeRollover(writeIndex, generation, indexModeFromTemplate);
    }
    /**
     * Like {@link #rollover(Index, long, IndexMode)}, but does no validation, use with care only.
     */
    public DataStream unsafeRollover(Index writeIndex, long generation, IndexMode indexModeFromTemplate) {
        IndexMode indexMode = this.indexMode;
        
        
        if ((indexMode == null || indexMode == IndexMode.STANDARD) && indexModeFromTemplate == IndexMode.TIME_SERIES) {
            indexMode = IndexMode.TIME_SERIES;
        }
        List<Index> backingIndices = new ArrayList<>(indices);
        backingIndices.add(writeIndex);
        return new DataStream(name, backingIndices, generation, metadata, hidden, false, system, allowCustomRouting, indexMode);
    }
    /**
     * Performs a dummy rollover on a {@code DataStream} instance and returns the tuple of the next write index name and next generation
     * that this {@code DataStream} should roll over to using {@link #rollover(Index, long, IndexMode)}.
     *
     * @param clusterMetadata Cluster metadata
     *
     * @return new {@code DataStream} instance with the dummy rollover operation applied
     */
    public Tuple<String, Long> nextWriteIndexAndGeneration(Metadata clusterMetadata) {
        ensureNotReplicated();
        return unsafeNextWriteIndexAndGeneration(clusterMetadata);
    }