Use switch expression in forElementBody()