Check for nil urls before adding them to the attributed string.

Closes #20.