Add super minimal query checking

Change-Id: Ie62aab5be3525c73a30bccc929643b76227e9b5f