added null check.
Some implementations of PagerAdapter#isViewFromObject(...) such as FragmentPagerAdapter do not accept null value as object argument(which causes NPE).
Merge pull request #16 from zaki50/fix-NPE

added null check.