target should be a Table or SyntheticTable

def add(self, name, target):
    "target should be a Table or SyntheticTable"
    if not isinstance(target, (table.Table, SyntheticTable)):
      raise TypeError(type(target), target)
    if name in self:
      # note: this is critical for avoiding cycles
      raise ScopeCollisionError('scope already has', name)
    self.names[name] = target