validates connection present for edge

Sometimes connection is undefined at show/hide Edge functions which creates a crash for 'fg' in next code:
```javascript
AbstractEdge.prototype = {
    hide: function() {
      this.connection.fg.hide();
      this.connection.bg && this.bg.connection.hide();
    }
};
```

So I believe it is good idea to check for:
```
this.connection