Add 'exists' param to queries