I\'ve got an app where I use a JSON based API. As part of JSON, often values are set to \"null\". This may be common:
{\"data\":[\"one\",\"two\",\"three\"]
You can first convert your NSDictionary to NSData, then safely store in NSUserDefaults (since NSNull conforms to NSCoding).
//archive
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dictionary];
[[NSUserDefaults standardUserDefaults] setObject:data forKey:@"key"];
//unarchive
NSData *newData = [[NSUserDefaults standardUserDefaults] objectForKey:@"key"];
NSDictionary *newDict = [NSKeyedUnarchiver unarchiveObjectWithData:newData];
Edit: Original data object was being referenced instead of newData object.