jri_getXxArray() functions treat arrays of length 0 as NULL. This seems deliberate in the code, but it is inconsistent as R is perfectly capable of representing 0-length arrays. This has been the case for more than a decade so it is unclear if making this consistent will break other's code so we may want to tread lightly.