These checks look a bit funny. You should simplify to either:
if (callback) {}

or even just:
callback && callback(...)