Bugfix. Handle case where url doesn't have an href attribute.
Fixes pointed out by jshint