[boxing-optimization] Minor, added check before retrieve insn