title: How to verify whether a browser exists in selenium webdriver
body: <p>I am using webdriver to open a Firefox browser and iteratively pass a URL to it using a spreadsheet (that contains 5 URLs in different cells of column 1).
  Now if suppose i manually close the firefox browser after two URLs were opened. I want my script to handle this situation and continue the execution for which i tried the below three conditions, however everytime i get a Null pointer exception.
  Please suggest how to handle this situation.</p>
  
  <pre><code>if (driver.toString().contains("null"))
  if (driver.getTitle().contains("null")) 
  if (driver.getCurrentUrl().contains("null")) 
  </code></pre>