@Contract(pure = true)
  public static <T> T @NotNull [] stripTrailingNulls(T @NotNull [] array) {
    return array.length != 0 && array[array.length-1] == null ? Arrays.copyOf(array, trailingNullsIndex(array)) : array;
  }
@Contract(pure = true)
  public static <T> T @NotNull [] stripTrailingNulls(T @NotNull [] array)