Closes #7070. Mitigates C++-land assertion error; adds tests accordingly.

dns: resolver: validate arguments

Closes #7070. Mitigates C++-land assertion error; adds tests
accordingly.