fixed error testing for aggtypes