SurfaceGestureDetector.onFling method protected with NPE checks

NPE Exception occurred on old versions of Android in SurfaceGestureDetector.onFling method. This patch adds NPE checks to avoid them.