| test      | null | length==0, ptr != null | ptr == null, length != 0 | valid |
| --------- | ---- | ------ | ------ | ----- |
| arr.ptr | false | true | false | true |
| arr.length | false | false | true | true |
| arr | false | true | false | true |
| arr != null | false | false | true | true |
| arr !is null | false | true | false | true |

ie `if (arr.length) == if (arr != null)` and so should `if (arr)`