Fixes NPE when null query is passed to AbstractDatabase#openQueryConnection.
Merge branch 'master' into feature/forms