Additional error checking.
Merge pull request #1 from samertm/master

Additional error checking for json-read