bool isRoot(String id) { return !this.incomesByNodeIdMap.containsKey(id) || this.incomesByNodeIdMap[id]?.length == 0; }