Few things,
First of all, you can look at the widgets by the color of the frame, looks like the specific one you use is the amount of people in the world.
Secondly, you aren't doing any checks, make sure your widget is visable and is not null.
Lastly, i would recommand declaring your world variable at the start but setting it only after you preformed all of your other actions. Might help.