Gasoline isn't the only thing you can find for cheap right now. 

The recent collapse in the price of oil has had an enormous impact on the share prices of dozens of companies with large exposure to oil costs. While companies that conduct the majority of their business producing oil, such as Continental Resources, have been hit the hardest -- reasonably so, since they will bear the brunt of the impact of cheap oil -- a number of other companies lumped in with oil producers have also taken a beating. 

But many of these companies are not really affected by cheap oil. If you're looking for value in energy companies, this is a great place to look for future upside.

Let's look at two companies that I'm ready to invest in thanks to the market's error.

Big Oil's best cheap investment
Phillips 66 (PSX -1.03%) is one of the biggest energy companies in the world, but since it was split from ConocoPhillips a few years ago, it has no exposure to oil or natural gas production. That hasn't stopped Mr. Market from knocking 30% off its stock price:

WTI Crude Oil Spot Price Chart

WTI Crude Oil Spot Price data by YCharts.

Phillips 66 operates in four segments of the midstream and downstream business: refining; pipeline and distribution; petrochemical manufacturing; and marketing of refined products. Yes, the refining and marketing businesses do have some exposure to oil prices, as the company must sell its end products at profitable levels, but demand is the bigger concern than falling prices.

Demand growth is weakening, but global oil consumption continues to rise. That bodes well for the company's demand-based businesses. It's the same story with Phillips 66's pipelines, which operate under long-term contracts that don't fluctuate with the price of oil or natural gas. With domestic natural gas and oil production -- as measured in decades -- expected to consistently grow, demand for Phillips 66's pipeline services should remain steady. 

The company's petrochemical business, a joint venture with Chevron, actually benefits from the relatively cheap and abundant supply of natural gas in North America. Natural gas is a great feedstock for the production of dozens of molecules that are widely used in consumer and industrial goods ranging from fabrics to plastics to fertilizers. 

The market's treatment of the company's stock has created a real value:

PSX PE Ratio (TTM) Chart

PSX P/E Ratio (TTM) data by YCharts.

With a price-to-earnings ratio below eight, and earnings per share growing, Phillips 66 is worth a hard look. But there's more for long-term minded investors. 

Fellow Fool Matt DiLallo said it best: the 3% dividend yield doesn't look very sexy on the surface, but it has been increased from $0.20 to $0.50 since 2012, while the stock price has doubled. That means investors who bought the stock in 2012 are enjoying a 6% yield on their original investment, while also seeing strong gains in the stock price. 

There's more to come: Management plans to increase the dividend by 10% each of the next two years, at the least. Lastly, the company is likely to maintain an aggressive share buyback program that has already reduced the share count by 11%, making it easier for the company to return more future profits to shareholders. 

One pipeline operator that is "OK" with me 
ONEOK (OKE -1.08%) has seen its stock price knocked down even more than Phillips 66:

OKE Chart

OKE data by YCharts.

Like Phillips 66, ONEOK has limited exposure to oil or natural gas prices, as its pipeline business is based on fees for moving natural gas and NG liquids from areas of production to areas of consumption. With more than 20,000 miles of total pipelines, ONEOK is one of the largest midstream companies in the U.S., and the nature of its long-term contracts provides a huge measure of predictability to its business results. 

Furthermore, transporting natural gas and natural gas liquids is its primary business, not oil. Demand for natural gas is growing around the world, as uses for chemical manufacturing, as a transportation fuel, and displacing coal to produce electricity all are likely to continue expanding in the years ahead. 

Just the expanded use for domestic chemical manufacturing alone is significant. According to the American Chemistry Council, more than $100 billion has already been committed by chemical companies around the world to petrochemical manufacturing projects in the U.S., based on access to cheap and plentiful natural gas. The council estimates that more than 500,000 permanent new jobs will be created as a result of this investment over the next decade.

This long-term growth in demand bodes very well for ONEOK's prospects. The market's treatment of the stock since last summer has created a significant opportunity to invest in a great midstream operator. 

Looking ahead 
While it's entirely possible that both of these companies' stocks will drop in the near term, their business prospects are as solid as it gets. In the interim, I'll be quite happy to take the dividends and reinvest them into even more shares on the cheap.

I fully intend to invest in both of these companies in the next month. As soon as the Motley Fool's disclosure policy allows me, I'll be picking up shares of these two companies and holding for the long term.