Minor fixes

Check correct address for null
Initialialize struct variables