Hi , Sorry my mistake data is not set to null if dataField is null only if the dataField doesn't exist.
if (dataField != null) { if (dataField in data) data = data[dataField]; else data = null; } But the real question is if dataField is null should it try to call data.toString or not? Justin