Since we say that the method raises a ValueError if an invalid href or name is specified -- isn't that enough?

If a user enters an invalid href (either an invalid group, or a totally malformed URL) -- they'll just get a ValueError out of the method.