[Enhancement] Close main activity and display a Toast message if router passed in is null