Using box_ref.length adds an assert that the box exists, so it can't be used. I've tried manually removing the assert from the TEAL and placing the modified version into my app spec but I guess the AVM throws it back in and it can't be bypassed.
box_len
swap
dup
uncover 2
assert // check BoxRef exists```
``` logic eval error: assert failed pc=107. Details: app=737469057, pc=107, opcodes=dup; uncover 2; assert```
Using `box_ref.maybe()[1]` still adds the box_get, which fails when the box content exceeds 4096 bytes:
```// box_exists = box_ref.maybe()[1]
box_get
bury 1```
```logic eval error: box_get produced a too big (4100) byte-array. Details: app=737470465, pc=102, opcodes=proto 5 0; bytec_0 // 0x0000000000000000; box_get```