Adding check to make sure getDef exists, so getStackTrace will not throw a javascript exception because of this
@rev ctatlah@
@bug W-1956983@
Merging origin/mike/master-pending-accessibilityToolGetStackTraceAddition into master