Update index.js

NPE fix for adding a reporter