Fix bug: exception thrown when any switch has not monitoring capability.

Fix bug: exception thrown when any switch has not monitoring capability and the network monitoring capability tries invoking it.