Added null check; getHost() returns null for data URIs.
Merge pull request #9 from tpesce/unstable

Added null check; getHost() returns null for data URIs.