There is something fishy here. So independent of `w.w` you either return `parseInt(w.w, 10) + 1` or `w.w`. And if `w.w` is null/undefined you return it. I guess `w.w` is shorter than `null` :) I'm not sure `dayOfYearFromWeeks` will run right if week is not an integer, so either `parseInt` is not needed or its mandatory in both cases :)