Slightly nicer code for if expression restructure.