             return self.groups
         } else {
             return self.groups?.filter({ (groupId) -> Bool in
-                return self.groupDataManager.fetchGroup(with: groupId).totalCount > 0
+                guard let group = self.groupDataManager.fetchGroup(with: groupId) else {
+                    assertionFailure("Expect group")
+                    return false
+                }
+                return group.totalCount > 0
             }) ?? []
         }
     }

                return UITableViewCell()
        }

        let assetGroup = self.groupDataManager.fetchGroup(with: groups[indexPath.row])
        cell.groupNameLabel.text = assetGroup.groupName

        let tag = indexPath.row + 1

        
        if let defaultAssetGroup = self.defaultAssetGroup {
            for groupId in groups {
                guard let group = self.groupDataManager.fetchGroup(with: groupId) else { continue }
                
                if defaultAssetGroup == group.originalCollection.assetCollectionSubtype {
                    return groupId
                }
