function check for varargs