Add sanity checks to JSON exporter.