conditional environment check