A slightly more reliable isJson check

fixes: https://github.com/firebase/flashlight/issues/20
Thanks for submitting this change! So great to get contributions from the community.

This particular change won't resolve the issue. If dat.query is a string and not a valid JSON, then it will fail on the next line when queryObj.hasOwnProperty tries to use it as an object. Additionally, the parse error is going to be valuable feedback to the client and should go into the results written back to search/out.