Unwrap result, replace if with match