--- 
+++ 
@@ -20,7 +20,7 @@
         }
         Class<?>[] classes = new Class[array.length];
         for (int i = 0; i < array.length; i++) {
-            classes[i] = array[i].getClass();
+            classes[i] = array[i] == null? null : array[i].getClass();
         }
         return classes;
     }