Not for this pull request, but this pattern has appeared a few times - if it comes up again it is probably worth creating a common class to safely read and cache a boolean from the environment.