code: func (t Topology) CheckValid() error {
  	switch t {
  	case TopologyNetwork, TopologyDirectedNetwork, TopologyDependency, TopologyTree:
  		return nil
  	default:
  		return errors.NewBadParameterError("topolgy", t).Expected(TopologyNetwork + "|" + TopologyDirectedNetwork + "|" + TopologyDependency + "|" + TopologyTree)
  	}
  }
docs: // CheckValid returns nil if the given topology is valid; otherwise a
  // BadParameterError is returned.