@Test
  public void indexKeyForShouldReturnNullWhenTheKeyIsNull() throws TypeMismatchException {
    Object key = TypeUtils.indexKeyFor(null);
    assertThat(key).isNull();
  }
Can't test every possible combination, so try a few ones.
geode-core/src/test/java/org/apache/geode/cache/query/internal/types/TypeUtilsJUnitTest.java