move container usage after nullptr check

Authored by hindenburg on Jul 25 2018, 2:12 PM.