why not put this check in the `readJson` method itself?