Protect against NullPointerException

To fix this issue https://github.com/47deg/android-swipelistview/issues/203