Avoid randoms NullPointerException

Sometimes the savedInstanceState is not null but getLongArray returns null. Now the code heck if array is null before foreach.