Mines do have hitpoints. All units have hitpoints, including many invincible units such as walls, trebuchets, portals, gold mines, etc. Some of these cannot be hovered over at all because they have the BENIGN category (e.g. walls), but most of them can be hovered over for information purposes (e.g. to see what level a ward is at, or who owns a captureable structure).
However, as in all GPG games, units with UNTARGETABLE and NOSPLASHDAMAGE categories are intended to be absolutely 100% invincible, and anything that causes something to be able to hit them is a bug. In this case, the extremely obvious bug is that the Nightwalker weapon isn't getting the UNTARGETABLE category parsed for its weapon restrictions, even though it's specified right in the string - there's just a syntax error keeping it from taking effect.
And yes, AI can issue all sorts of illegal orders that players can't, such as teleporting to untargetable walls. This is because that object is technically a valid target for the ability itself (determined by category, or in most cases, lack of category exceptions) and the AI is getting a handle to the object via overly-broad category filters (in the case of wall teleportation, STRUCTURE instead of STRUCTURE and DEFENSE), but the UI's targeting mask prevents e.g. structures from being targeted by Swap for human players. If you look at the blueprints of these abilities, they'll list both a TargetingMethod (the UI mask) and TargetCategory (what the sim-side ability code allows it to be used on). The UI does not take categories into account, and allows you to actually click a mask-valid target before halting the cast based on category filters.
It's possible there's a bug in the AI somewhere that doesn't check categories before attempting to issue some ability casts, and the AI DA will attempt to start a Swap cast on an invalid target only to be stopped by the ability system itself (Swap has a TargetCategory of HERO, allowing only use on demigods regardless of what the AI tells it to cast on).
The latest version of the AI mod fixes most if not all of these illegal cast attempts, including wall teleportation. As evidenced by the behavior of an AI DA trying to swap a tower, it's not good enough just to prevent the ability from being cast on invalid targets (e.g. adding DEFENSE to the TargetCategory of the teleport item abilities), as that just makes the AI get stuck in that cast loop until it's interrupted by something.