You are creatingWhen you declare an object in java the default value it gets is null.
So you declared a newclass variable driver and hence it gets the value null.
Now in your @test so thatthe googletitle method you declared another object driver . So this driver becomes local variable to Google titleto that method and what ever you will have scope local. The class variable driver will still be empty
And in tear down you are accessing the class variable which is still null. That's why you are getting null point exception.
So change
WebDriver driver = new ChromeDriver();
To
driver = new ChromeDriver();
This ensures you are using class variable driver inside the @test method