check for invalid aggregate comparison