I see. Can you just tweak these slightly to set the ptr to an empty byte array and return true? Like this:

ptr.set(ByteUtil.EMPTY_BYTE_ARRAY);
return true;

There's a slight different between returning false and returning true with an empty byte array. In the case of returning false, when executing server-side, we'll keep trying to re-eval until we get a true back, thinking that we don't have enough info to evaluate. In this case, you have enough info, but just can't evaluate it.