Rewrite if statement for clarity

[#74272272]