Update CustomTable.java

Add null checks to avoid a strange situation with Null Pointer Exceptions.