Fix possible NPE in ClusterState.toString()

ClusterState.toString() can throw NPE if at least on index template exists in the cluster state.