I have a nullpointer exception in the following code on line if(mapSoldAppStatus.containsKey(user.Id)){:
Map<String,Map<String,Integer>> mapSoldAppStatus = ReportPageController.prepareMapObjectUnitPerStatus(Ids, status, 'userIddate__c');
for(userIddate__c user : userList){
if(mapSoldAppStatus.containsKey(user.Id)){
}
}
Do I only need to check if the map mapSoldAppStatus is empty before entering the loop or do I need to also check if the mapSoldAppStatus.containsKey(user.Id) is empty. I suppose if the user is not in the list then the .containsKey(user.Id) wont be looking for it.
Just want a confirmation if I am understanding this correctly.