Added support for nested  ternary statement.