wondering if it would be cleaner to use a promise instead:

`checkSilentModeFor(smsNumber).then(function(isSilent) { if (isSilent) { ... } }`

I'm not so sure it's better in this case, but I try to use promises as much as possible these days because it generally helps to have a cleaner code. So it's your call !