title: Crash after checking if NSDictionary can be archived
body: <p>I have the following code to create an NSDictionary and then check if all of its values (and itself) are nil or not when being archived:</p>
  
  <pre><code>NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  NSString *openbook = [defaults objectForKey:@"OpenBookKey"];
  NSString *book = [NSString stringWithFormat:@"UploadedWB%@", openbook];
  
  Reachability *reachability = [Reachability reachabilityForInternetConnection];
  NetworkStatus internetStatus = [reachability currentReachabilityStatus];
  if (internetStatus != NotReachable) {
  
  [activityIndicator setHidden:NO];
  [activityIndicator startAnimating];
  
  NSLog(@"Sending data to cloud");
  
  NSInteger integer = [[defaults objectForKey:@"CurrentIndex"] integerValue];
  
  NSArray *paths = NSSearchPathForDirectoriesInDomains
  (NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  
  NSString *fileName = [NSString stringWithFormat:@"%@/BVAuthors.txt",
                        documentsDirectory];
  
  NSString *fileName1 = [NSString stringWithFormat:@"%@/BVImages.txt",
                        documentsDirectory];
  
  NSString *fileName2 = [NSString stringWithFormat:@"%@/BVTitles.txt",
                         documentsDirectory];
  
  NSMutableArray *authors = [NSMutableArray arrayWithContentsOfFile:fileName];
  NSMutableArray *images = [NSMutableArray arrayWithContentsOfFile:fileName1];
  NSMutableArray *titles = [NSMutableArray arrayWithContentsOfFile:fileName2];
  
  NSString *author = [authors objectAtIndex:integer];
  UIImage *image = [images objectAtIndex:integer];
  NSString *title = [titles objectAtIndex:integer];
  
  NSLog(@"Sending %@ by %@", title, author);
  
  NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:_pages, @"pagesarray", _pagessavedbg, @"pagessavedbgarray", author, @"author", image, @"image", title, @"title", nil];
  
  // NSLog(@"DICT: %@", dict);
  
  if([NSKeyedArchiver archivedDataWithRootObject:dict] != NULL)
  {
  
  NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dict];
  
  NSLog(@"Here the data is used, but it crashes before this point");
  
  }
  
  else
  
  {
  
    NSLog(@"This is never called :(");
  
  }
  
  }
  </code></pre>
  
  <p>I always get a crash on <code>[NSKeyedArchiver archivedDataWithRootObject:dict] != NULL</code> and the following error appears:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection &lt;__NSArrayM: 0x1e8a8fd0&gt; was mutated while being enumerated.'
  *** First throw call stack:
  (0x38e8c6c3 0x3b0a597f 0x38e8c1a5 0x3b1b0527 0x3b1b02b9 0x3b1af04f 0x3b1b0537 0x3b1ea455 0x3b1af04f 0x3b1ae8f5 0xcfeaf 0x3b24d6bd 0x388dc351 0x388dc218)
  libc++abi.dylib: terminate called throwing an exception
  (lldb) 
  </code></pre>
  
  <p>Why is this occurring?</p>