Added to check a type at `scrollListener`

When we use other scrollable views in `TableView` with `pullToRefresh`, the app throw an error that cannot find `e.contentOffset`.

So I added some lines to check the type of `e.contentOffset` in `scrollListener()` function.