Removed null pointer exception in DocExtractor