Oh right, how about this?
```
if (isOnChange) {
   if (callback === null) || (typeof callback === 'function'))) {
        _listeners[0] = callback;
        listener_id = 0;
   }
} else {
    listener_id = _next_listener_id;
    _next_listener_id += 1;
   _listeners[listener_id] = callback;
} 
```