In order to not fail when no callback is used, this can be changed to:

    if (typeof callback === 'function') { callback(self); }