I have a core data field that is a String which is optional. Sometimes in my json response I will get back null. If I don't do the following code check below, the program crashes. Is there a better way to do this?
story.author = [newsStory valueForKeyPath:@"author_title"] != [NSNull null] ? [newsStory valueForKeyPath:@"author_title"] : @"Staff Writer";