Checks for queries and other business logic in handlers and views.