title: Does NSDictionary initWithObjectsAndKeys handles NULL/nil objects and other than NSString objects
body: <p>I am trying to initialize NSDictionary but it gives me following error:</p>
  
  <pre><code>Program received signal:  “EXC_BAD_ACCESS”.
  </code></pre>
  
  <p>Here is my problematic code[Quiz.m]:</p>
  
  <pre><code>@implementation Quiz
  
  @synthesize question;
  @synthesize correctAnswer;
  @synthesize userAnswer;
  @synthesize questionId;
  
  -(NSString*) getAsJsonString
  {   
      // Following line gives the error
      NSDictionary *qDictionary=[[NSDictionary alloc] initWithObjectsAndKeys:question,@"questionText",questionId,@"questionId",userAnswer,@"userAnswer",correctAnswer,@"correctAnswer",nil];
  
      ..............
      .........
      ............
      return jsonString;
  }
  @end
  </code></pre>
  
  <p>And here is Quiz.h file for reference</p>
  
  <pre><code>@interface Quiz : NSObject {
  
  @public
      NSString * question;
      BOOL correctAnswer;
      BOOL userAnswer;
      NSInteger questionId;
  }
  
  @property (nonatomic,retain) NSString * question;
  @property (nonatomic, assign) NSInteger questionId;
  @property (nonatomic,assign) BOOL correctAnswer;
  @property (nonatomic,assign) BOOL userAnswer;
  
  - (NSString*) getAsJsonString;
  @end
  </code></pre>
  
  <p>How should I fix it, please help me, I am new to objective c and it is driving me nuts. Does the NSDictionary initWithObjectsAndKeys handle objects other than string and null objects?</p>