Avoid using isJust/fromJust, switch to pattern guards