Consider the following pseudocode for validating balanced parentheses. What is the function of the 'if' condition inside the loop?
function isBalanced(expression):
stack = Stack()
for char in expression:
if char in ['(', '[', '{']:
stack.push(char)
# ... (rest of the code)