patch 8.2.3162: Vim9: argument types are not checked at compile time

Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes #8560)
diff --git a/src/clientserver.c b/src/clientserver.c
index 7215aa7..00bea6f 100644
--- a/src/clientserver.c
+++ b/src/clientserver.c
@@ -887,8 +887,15 @@
     char_u	*r = NULL;
 
 #ifdef FEAT_CLIENTSERVER
-    char_u	*serverid = tv_get_string_chk(&argvars[0]);
+    char_u	*serverid;
 
+    if (in_vim9script()
+	    && (check_for_string_arg(argvars, 0) == FAIL
+		|| (argvars[1].v_type != VAR_UNKNOWN
+		    && check_for_number_arg(argvars, 1) == FAIL)))
+	return;
+
+    serverid = tv_get_string_chk(&argvars[0]);
     if (serverid != NULL && !check_restricted() && !check_secure())
     {
 	int timeout = 0;