Still the same problem. This will be evaluated as a string while it should be evaluated as null (hint: `i.data IS NOT NULL`). Your code will also return record with data = null, causing the rest of your code to fail.