Use more strict validation for environment param