[qtdocgallery] Verify the type of query results before accessing them.
Merge pull request #10 from adenexter/warnings

Verify the type of query results before accessing them.