Added type checking for jit returns