Error in Javascript when notifications_list == null