Add more null checks