Adding a null-check to 'RestClient.EncodeParameter'; optimizing relevant code.