The second one should be:
```
// check validation of callback for oncontactschanged way, it can be null or a function
if (isOnChange && (callback !== null && (typeof callback !== 'function'))) {
```