Use choose-when-otherwise instead of double-if.