 tried: NSPredicate *p = nil; NSNumberFormatter *nf = [[NSNumberFormatter alloc] init]; NSNumber *yearNo = [nf numberFromString:term]; if (yearNo) {     p = [NSPredicate predicateWithFormat:@"(cars.year == %