check parens validity