Use if_ok approach on protocol pipes