More fixes for potential nulls.
There may be more of these -- in battles, for example. I wasn't entirely sure about what could be null or not.