Check "data.query" exists

Check "data.query" exists before checking the data.query.session_id.
Avoid: "TypeError: Cannot read property 'session_id' of undefined "
Merge pull request #51 from gkorland/patch-2

Check "data.query" exists