Check return value for null to prevent possible crash. Also, get ASCII from NSString instead of UTF8.