internal/errors: improve ERR_INVALID_ARG_TYPE
The error message might be misleading if a object property was the issue and not the argument itself.
Fix this by checking if a argument or a property is passed to the handler function.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
internal/errors