Fix possible null deref warnings

Removed other checks which are making it think
other things could be null. Looking elsewhere in
these files, many other places assume these things
aren’t null.
Also fix a call to GetMaximum that should have been
GetMTime.
Change-Id: Ie880a0992b64ce4389ab9b40d48aa32692595362