Added further null handling