Investors are taking a closer look at companies as they shift away from cigarettes.