Corrects JSON checks to fix #315.
Merge pull request #316 from LearningLocker/issue-315

Corrects JSON checks to fix #315.