Add null pointer checks in query validation.
Merge branch 'master' of github.com:rug-compling/dact