Move boolean check for swap code into method valueShouldSwap.