benchmarks/scenarios/ember.js
function tryInvoke(obj, methodName, args) {
    if (canInvoke(obj, methodName)) {
      return args ? applyStr(obj, methodName, args) : applyStr(obj, methodName);
    }
  }
function tryInvoke(obj, methodName, args) {
    if (canInvoke(obj, methodName)) {
      return args ? applyStr(obj, methodName, args) : applyStr(obj, methodName);
    }
  }
function tryInvoke ( obj , methodName , args ) { if ( canInvoke ( obj , methodName ) ) { return args ? applyStr ( obj , methodName , args ) : applyStr ( obj , methodName ) ; } }
Checks to see if the `methodName` exists on the `obj`,
and if it does, invokes it with the arguments passed.

```javascript
var d = new Date('03/15/2013');

Ember.tryInvoke(d, 'getTime');              // 1363320000000
Ember.tryInvoke(d, 'setFullYear', [2014]);  // 1394856000000
Ember.tryInvoke(d, 'noSuchMethod', [2014]); // undefined
```

@method tryInvoke
@for Ember
@param {Object} obj The object to check for the method
@param {String} methodName The method name to check for
@param {Array} [args] The arguments to pass to the method
@return {*} the return value of the invoked method or undefined if it cannot be invoked
@public
Checks to see if the methodName exists on the obj and if it does invokes it with the arguments passed .