flip conditional to use if/else instead of unless/else

Use if/else instead of unless/else so conditional reads better.
Merge pull request #15080 from eileencodes/flip-unless-else-conditional-in-halting-method

flip conditional to use if/else instead of unless/else