This PR adds a method to ElementHandle that validates the tag type of that handle and returns it. Fixed: #8579, #9280