feat: validateBooleanMiddleware for controllers (#1023)
* add utility testing functions to util file * refactor address middleware tests with util functions * add validateBooleanMiddleware * validateBooleanMiddleware tests * export middleware * add validateBooleanMiddleware to controllers that use it * fix inline comments * remove hardcoded values * fix test * refactor middleware to be more efficient * fix query check