Check isLocal using Uri.TryCreate. It is possible in case we have only absolute url.