Prevent undefined error if the <a> does not have an href attribute.