Instead of the additional attribute you could check to see if the strlen of getHref is 0.