Why xmlsitemap module implements hook_node_comment_delete this way?
It seems like the author of that function might just have been a tiny bit over-zealous in trying to strongly-type the $comment parameter.

The hook_comment_delete() docs don't really give any indication that it should be implemented in this manner; but if you look at the signature for the Drupal 8 version of the function, you'll see the parameters are typed. It might be that the author was following that 'pattern' when creating the function (rightly or wrongly). That's a complete guess though.

I haven't seen hook parameters being typed like this in any other contrib modules that I can think of, so it's probably an isolated incident (although this format is consistent across most of the hooks for the xmlsitemap node module).

I think the best way forward would be to create a patch that fixes the issue, and perhaps submit it to the XmlSitemap issue queue for others to review.