Check for data before converting to JSON
Merge pull request #2049 from dimagi/custom_reg_data

Check for data before converting to JSON