check if sliderView is not null before swiping