As per docs NSString throws an exception if the bytes are null
What you need to do is check the returned value and only create the string if it is not null
char *localityChars = sqlite3_column_text(compiledStatement, 8);
if (localityChars == nil) {
self.DirectionFromCity = nil;
} else {
self.DirectionFromCity = [NSString stringWithUTF8String: localityChars];
}
In response to the comment below re code growing with the extra checking, you can shrink it down using
self.DirectionFromCity = localityChars != nil?[NSString stringWithUTF8String: localityChars]:nil;
or push it out to a method that will do the same functionality
self.DirectionFromCity = [self getSQLiteColumn:compiledStatement];