Adding missing null check