simplify some code to eliminate unnecessary tests, NFC.
simplify some code to eliminate unnecessary tests, NFC.

khizkhiz/swift,khizkhiz/swift,khizkhiz/swift,khizkhiz/swift,khizkhiz/swift,khizkhiz/swift,khizkhiz/swift