public static int size(@Nullable Object[] array) {
    return array == null ? 0 : array.length;
  }
Length of the given array or 0 if it's null.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java