add missing null check