check if closing brace is required or not.