I have ther exact same problem. Just upgraded to Mountain Lion. Contacts don't show in my All Contacts window, and next to iCloud there's a triangle:
NSInvalidArgumentException] *** -[__NSSetM addObject:]: object cannot be nil
It lets me see my groups, and click on them and search within the groups, but it doesn't let me search my entire database anymore, which renders it unusable (5000+ records).
I finally worked around it. I tried to read Contacts after updating Mac Os X Mountain Lion to 10.8.2. Was empty. I tried to interrogate it and had another error telling there was a problem due to Contacts. Well…
I was sure that the version on the cloud was good since it continued to sync well with my iPhone.
I went to iCloud preferences accounts, then suppressed contacts from the list, and chose it again. Then all seems to be working fine.
Only lost some recent modifications done on the mac which had never been synced.
I think I found the root cause. I couldn't get my contacts to sync because of the same "object cannot be nil".
I had Contacts open when I turned off the iCloud Contacts in Preferences. I said don't keep a copy on my Mac. When I did that, I found a couple of groups wiht no name (the group names were just blank). I gave them names (nil and non-nil!) and then was able to delete the groups from my Mac's contacts. Then I re-checked Contacts syncing, and it worked much better!
I think that the object that couldn't be nil was the group name, which prevented iCloud syncing. That makes sense.
Open System Preferences > iCloud Deselect iCloud Syncing on Contacts. You will be asked if you want to delete the contacts from your computer - select yes. Wait 2 minutes. Select Contacts you will see a dialogue "setting up". Contacts on your computer. Open iCloud.com > Contacts - wait a moment, everything syncs back to normal including recently added contacts and group settings. Worked for me.