Support expressions in boolean conditions (#13761)

Change-Id: Id0914adc7df4e3d673b06d9a98505ec4a568c5e9