Object.keys(data).forEach(function(key) {
        if(data[key] === undefined) {
            data[key] = null;
        }
    });