Export the function IsValidEnvironment.

The function will be used in juju - need to export it.