I would go ahead and rewrite this entire function to being just:
```
return A.Lang.isValue(userId) && !A.Lang.isUndefined(instance._buddies[userId]);
```