BuildUri: Tell which UrlSegment parameter value is null

Currenty a NullReferenceException is thrown. I belive this should be handled better. But I did not want to change the behaviour (i.e. accepting null). So I decided to throw a more descriptive error instead.