Update EnvironmentChecks.java

This code was based on a misunderstanding.