Removing an unneeded ternary statement