attempt to fix null values sent to query in iOS