Changing behaviour of executeCallback function in router
No more throws an error if callbackToBeExecuted is undefined.
Executes callback only if it's defined.