protected Map<String, Cluster> getCheckedClusterMap(Clusters clusters) {
    if (clusters != null) {
      Map<String, Cluster> clusterMap = clusters.getClusters();
      if (clusterMap != null) {
        return clusterMap;
      }
    }
    return new HashMap<>();
  }
This method returns Map of clusters.
Map can be empty or with some objects, but never be null.
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java