title: Detect and removing JSONArray null response
body: <p>I am getting json response as </p>
  
  <pre><code>   {"image_data": [
  [
    {
      "post_id": "331",
      "meta_key": "_wp_attached_file",
      "meta_value": "2014/09/443025.jpg"
    }
  ],
  [
    {
      "post_id": "364",
      "meta_key": "_wp_attached_file",
      "meta_value": "2014/09/632026.jpg"
    }
  ],
  [
    {
      "post_id": "657",
      "meta_key": "_wp_attached_file",
      "meta_value": "2014/10/233506.jpg"
    }
  ],
  [
    {
      "post_id": "727",
      "meta_key": "_wp_attached_file",
      "meta_value": "2014/10/653413.jpg"
    }
  ],
  "null",
  "null",
  [
    {
      "post_id": "958",
      "meta_key": "_wp_attached_file",
      "meta_value": "2014/10/801582.jpg"
    }
     ]
    ]
    }
  </code></pre>
  
  <p>Problem is am getting error for type mismatch because of null value. In given json response there is three null value. I have to detect that null value and ignore that value. I've tried </p>
  
  <pre><code>  JSONArray imageDataArray = response.getJSONArray("image_data");
    for (int j = 0; j &lt; imageDataArray.length(); j++) {
                                  // ad image data
                                  if ((imageDataArray.getJSONArray(j)) == null) {
                                      continue;
                                  }else{
                                      JSONArray adimageData = imageDataArray
                                              .getJSONArray(j);
  
                                       //doing my work
                                  }
  
                              } 
  </code></pre>
  
  <p>But getting type mismatch error. In logcat it saying value null can not be converted to jsonarray. I need solution ...... please suggest me to do the right thing </p>