Bug fixing when providing a null configuration for the callback function.
Added better argument validation