Replace manual ArrayIsArray checks that throw ERR_INVALID_ARG_TYPE with
the shared validateArray helper. The error code, argument name and
expected type are unchanged, so the thrown error stays identical.
Signed-off-by: greenhead <shren0812@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64959
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>