add typechecks to query namespace