[3.0] Add some more null checks