BasePort: fix isConnected() when no socket are attached

Spotted exception with WirePattern when no output port is connected.
Sounds like we should do the same as listAttached() in isConnected() or do a isAttached() first thing as we enter isConnected().