added additional json sanity checks