Testing for problem in reindex leading to Null Pointer exception