Updated JSON availability check
fixed object check
bug in conditional check
Merge pull request #59 from aghouseh/update-json-availability-check

Updated JSON availability check