if $protocol is not an instance of MagentoItemStep it throws a fatal error.
@gquemener advised me to add this test in the goal to avoid it.