Added basic query field validation