Update TridentSelection.js

Prevent "'length' is empty or not an object" exception