I am trying to access numbers from list/vector, in general when I call normally not getting issue. But when I use it with foreach or for loop getting NULL as a result