No, I mean this particular check: 

if (RoleEnvironment.IsAvailable). 

It's the same check in ContainerBinding.IsDeployedToCloud.

And if you call RoleEnvironment without installing Azure SDK, it throws. I think you were the one who fixed that. :)