this will cause `oncontactschange = null;` get ignored, that is not what we want. 
And I do not think need check with isOnChange parameter, because it is internal, not parameters controlled by webapp developer. You could see the only two places you call are valid.

 I'd like rewrite above three `if` clause as
```
if (!isOnChange && (typeof callback !== 'function')) {
  console.log("Invalid parameters of callback!");
  return -1;
}
```