Added simple parenthesis validation for expressions