Fix TypeError when attrs['href'] is None in handle_tag.