Update IndexBuilder.java

fixed npe