Treat 'undefined' values in records as 'null's in a JSON.