NXP-12675: combine if statements