"Valid ad hominem arguments occur in informal logic, where the person making the argument relies on arguments from authority such as testimony, expertise..."
Any ad hominem cannot inform you about the quality of an argument. It _can_ inform you that you should look at an argument critically but, even in the "valid" form, it doesn't address the argument.
https://en.m.wikipedia.org/wiki/Ad_hominem
It appears that the original comment was valid ad hominem, but still ad hominem.