Fix FC023 violation:  Prefer conditional attributes