Add some more null checks