Here is the main class where the error occurs, empty has been initialized properly, and still it is giving a nullpointerException It was initially a standalone project which