Repository: jdbi/jdbi
Issue: NullPointerException in SqlBatch with a constant parameter value of null

I'm trying to execute an `@SqlBatch` with a constant parameter value of `null`. This causes a `NullPointerException` in JDBI while  testing if arguments are iterable-like.

This code reproduces the issue:
```java
public interface Sql {
  // create table user (tenant_id varchar(20), name varchar(20))
  @SqlBatch("insert into user(tenant_id, name) values (:tenantId, :name);")
  void insert(String tenantId, @Bind("name") List<String> names);
}

Jdbi jdbi = Jdbi.create(connectionUrl);
jdbi.installPlugin(new SqlObjectPlugin());
jdbi.useHandle(handle -> {
  Sql sql = handle.attach(Sql.class);
  sql.insert(null, asList("foo", "bar"));
});
```

Stacktrace:
```
java.lang.NullPointerException
	at org.jdbi.v3.core.internal.IterableLike.isIterable(IterableLike.java:48)
	at org.jdbi.v3.sqlobject.statement.internal.SqlBatchHandler.zipArgs(SqlBatchHandler.java:269)
	at org.jdbi.v3.sqlobject.statement.internal.SqlBatchHandler.invoke(SqlBatchHandler.java:174)
	at org.jdbi.v3.sqlobject.internal.SqlObjectInitData$1.lambda$invoke$0(SqlObjectInitData.java:125)
	at org.jdbi.v3.core.internal.Invocations.invokeWith(Invocations.java:44)
	at org.jdbi.v3.core.ConstantHandleSupplier.lambda$invokeInContext$0(ConstantHandleSupplier.java:56)
	at org.jdbi.v3.core.internal.Invocations.invokeWith(Invocations.java:44)
	at org.jdbi.v3.core.ConstantHandleSupplier.invokeInContext(ConstantHandleSupplier.java:52)
	at org.jdbi.v3.sqlobject.internal.SqlObjectInitData$1.call(SqlObjectInitData.java:131)
	at org.jdbi.v3.sqlobject.internal.SqlObjectInitData$1.invoke(SqlObjectInitData.java:125)
	at org.jdbi.v3.sqlobject.SqlObjectFactory.lambda$attach$2(SqlObjectFactory.java:110)
	at com.sun.proxy.$Proxy39.insert(Unknown Source)
```

Changed files:
core/src/main/java/org/jdbi/v3/core/internal/IterableLike.java, sqlobject/src/test/java/org/jdbi/v3/sqlobject/TestBatching.java

diff --git a/core/src/main/java/org/jdbi/v3/core/internal/IterableLike.java b/core/src/main/java/org/jdbi/v3/core/internal/IterableLike.java
index 80b0e3bf2..df982c85b 100644
--- a/core/src/main/java/org/jdbi/v3/core/internal/IterableLike.java
+++ b/core/src/main/java/org/jdbi/v3/core/internal/IterableLike.java
@@ -45,7 +45,7 @@ public class IterableLike {
     public static boolean isIterable(Object maybeIterable) {
         return maybeIterable instanceof Iterator<?>
             || maybeIterable instanceof Iterable<?>
-            || maybeIterable.getClass().isArray();
+            || maybeIterable != null && maybeIterable.getClass().isArray();
     }
 
     /**
diff --git a/sqlobject/src/test/java/org/jdbi/v3/sqlobject/TestBatching.java b/sqlobject/src/test/java/org/jdbi/v3/sqlobject/TestBatching.java
index 8f2d659fb..bd88f6e4a 100644
--- a/sqlobject/src/test/java/org/jdbi/v3/sqlobject/TestBatching.java
+++ b/sqlobject/src/test/java/org/jdbi/v3/sqlobject/TestBatching.java
@@ -67,6 +67,21 @@ public class TestBatching {
         assertThat(b.size()).isEqualTo(2);
     }
 
+    @Test
+    public void testBindConstantNull() {
+        UsesBatching b = handle.attach(UsesBatching.class);
+        List<Integer> ids = Arrays.asList(1, 2, 3, 4, 5);
+
+        b.withConstantValue(ids, null);
+
+        assertThat(b.size()).isEqualTo(5);
+
+        List<String> names = handle.createQuery("select distinct name from something")
+                                   .mapTo(String.class)
+                                   .list();
+        assertThat(names).containsExactly((String) null);
+    }
+
     @Test
     public void testBindConstantValue() {
         UsesBatching b = handle.attach(UsesBatching.class);