title: NSPredicate for NSNumber property of NSManagedObject
body: <p>I have <code>NSNumber * year</code> property of <code>NSManagedObject</code>, it's type in data model is <code>Integer 16</code>.</p>
  
  <p>I try to check with <code>NSPredicate</code> for this year, but can't find the right one.</p>
  
  <p>What I tried:</p>
  
  <pre><code>NSPredicate *p = nil;
  NSNumberFormatter *nf = [[NSNumberFormatter alloc] init];
  NSNumber *yearNo = [nf numberFromString:term];
  if (yearNo) {
      p = [NSPredicate predicateWithFormat:@"(cars.year == %i)", yearNo.intValue];
  }
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>NSPredicate *p = nil;
  NSNumberFormatter *nf = [[NSNumberFormatter alloc] init];
  NSNumber *yearNo = [nf numberFromString:term];
  if (yearNo) {
      p = [NSPredicate predicateWithFormat:@"(cars.year == %@)", yearNo];
  }
  </code></pre>
  
  <p>In both cases app crashes.</p>