Modify the switchModel method to support the case where we don't yet have an env instance.
Modify the switchModel method to support the case where we don't yet have an env instance.

bac/juju-gui,mitechie/juju-gui,bac/juju-gui,mitechie/juju-gui,bac/juju-gui,bac/juju-gui,mitechie/juju-gui,mitechie/juju-gui