Update : nullPointerException fix when update on empty repository