Fix for IllegalArgumentException with null URL host.