Convert conditional modifier to if-block