improve parenthesis handling in extWhere