minor bug fixes

In C# string.Length will throw an exception when string is null which defeats the purpose of TryParse.

Broken external ip service replaced with one chosen from Google. Tested and working with both IP and DNS and correctly parsed by regex.