title: ConcurrentModifcationException happens occasionally
body: <p>I have a function with a line that is supposedly meant to prevent a concurrent modification exception 
  List parseObjectKeys = new ArrayList&lt;>(parseObject.keySet());
  However it still happens every now and again</p>
  
  <pre><code> private static void convertParseObject(ParseObject parseObject,
                                         HashMap&lt;String, HashMap&lt;String, WritableMap&gt;&gt; topLevel,
                                         ArrayList&lt;Task&lt;Void&gt;&gt; tasks) {
      if (parseObject != null) {
          String className = parseObject.getClassName();
          String id = parseObject.getObjectId();
  
          if (!topLevel.containsKey(className)) {
              topLevel.put(className, new HashMap&lt;String, WritableMap&gt;());
          }
  
          if (!topLevel.get(className).containsKey(id)) {
              final WritableMap flatMap = Arguments.createMap();
              flatMap.putString("class", className);
              flatMap.putString("id", id);
  
              if (parseObject.isDataAvailable()) {
  
              topLevel.get(className).put(id, flatMap);
  
              // This is required to prevent a ConcurrentModificationException
              List&lt;String&gt; parseObjectKeys = new ArrayList&lt;&gt;(parseObject.keySet());
  
              for (final String key : parseObjectKeys) {
                  Object value = parseObject.get(key);
  
                  if (value instanceof String) {
                      flatMap.putString(key, (String) value);
                  } else if (value instanceof Boolean) {
                      flatMap.putBoolean(key, (Boolean) value);
                  } else if (value instanceof Integer) {
                      flatMap.putInt(key, (Integer) value);
                  } else if (value instanceof Double) {
                      flatMap.putDouble(key, (Double) value);
                  } else if (value instanceof Date) {
                      flatMap.putString(key, Utils.toISO8601UTC((Date)value));
                  }
                  else {
                      if (value != null &amp;&amp;
                              !(value instanceof ParseACL)) {
                          Log.e(TAG, "Unknown type: " + value.getClass());
                      }
                  }
              }
          }
      }
  }
  </code></pre>