Small refactor of elseif.