Added support for checkQuery and checkParams + tests