I do prefer to do the check as follow:
```
if (typeof callback === 'function') {
  callback();
}
```
Could you please change it here and everywhere you call the callback function please? Thanks.