Change the right paren check code from a match to an if