Add NPE check to onScroll