Solved nullPointerException in IndexController where the notification is created