since todos initial value is null, update code for NPE issue