Removed check for query to allow to pass no filter to functions