patch 8.2.1945: crash when passing NULL function to reduce()

Problem:    Crash when passing NULL function to reduce().
Solution:   Check for NULL pointer and give an error. (Dominique Pellé,
            closes #7243)
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim
index ade37f8..6a7fc4c 100644
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -740,6 +740,9 @@
 
   call assert_equal(42, reduce(test_null_list(), function('add'), 42))
   call assert_equal(42, reduce(test_null_blob(), function('add'), 42))
+
+  " should not crash
+  call assert_fails('echo reduce([1], test_null_function())', 'E1132:')
 endfunc
 
 " splitting a string to a List using split()