Simplify check_serial code in JIT helpers