Added more NULL checks

For weapons and armor, we always assumed that the member variable templ
!= NULL. I added a few passerts to be sure.

A few other NULL checks were added.