Fix bug in _isFunction