patch 9.0.0335: checks for Dictionary argument often give a vague error

Problem:    Checks for Dictionary argument often give a vague error message.
Solution:   Give a useful error message. (Yegappan Lakshmanan, closes #11009)
diff --git a/src/terminal.c b/src/terminal.c
index c0fa125..0283267 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -4989,11 +4989,8 @@
     {
 	dict_T *d;
 
-	if (argvars[2].v_type != VAR_DICT)
-	{
-	    emsg(_(e_dictionary_required));
+	if (check_for_dict_arg(argvars, 2) == FAIL)
 	    return;
-	}
 	d = argvars[2].vval.v_dict;
 	if (d != NULL)
 	{