Simplify environment check.