title: How To Handle If Response Is nil, in objective-c
body: <p>All,<br>
  How to handle if the response is nil.<br>
  if response do have any network issue it provided me string format.</p>
  
  <pre><code> if ([response isKindOfClass:[NSString class]]) {
      // print response .
   }
      //on successfully response, which provided dictionary, 
      //check for key success which do have true or false.
   else if ([[response objectForKey:@"success"] boolValue] == true) {
      // on true print response data.
   }
      //on success response, with failure message which is false.
   else if ([[response objectForKey:@"success"] boolValue] == false) {
      // handle error on success is false.
   }
  </code></pre>
  
  <p>Here my question comes,if make response to nil 
  <code>response = nil</code>; <br>
  how to handle if response is nil?  and satisfy the above the conditions also.</p>
  
  <p>since manually i set response data is nil.</p>
  
  <p><code>id response = nil;</code> it trigger the below condition also.</p>
  
  <pre><code>else if ([[response objectForKey:@"success"] boolValue] == false) {
  // handle error on success is false.
  }
  </code></pre>
  
  <p>@All Thanks in Advance.</p>