What: Shares of natural gas and NGL midstream company ONEOK (OKE -1.08%) and its master limited partnership, ONEOK Partners LP (OKS), are down 12% and 9%, respectively, at 12:30 ET on Feb. 9. After having traded up (and down but mostly up) over the past few weeks, today's big move south leaves both down 17% so far this year. Since April 2015, both are down by a lot more:

OKE Chart

OKE data by YCharts.

So what: ONEOK's stock was downgraded by an analyst at Robert W. Baird on Feb. 8, from a "neutral" rating to "underperform."

Frankly, this negative rating comes at a strange time, considering that ONEOK has dealt with much of the uncertainty that has been weighing on the company for the past several months.

The biggest near-term fear that investors have had with ONEOK is that it would be forced to cut its dividend because of short-term pressures on the cash flows generated by ONEOK Partners, which is the source of all of ONEOK's revenues. However, ONEOK recently announced that it had entered into a $1 billion three-year unsecured term loan, simultaneously refinancing all of the company's 2016 debt maturities, while also providing enough excess capital to cover capital-growth projects currently underway, and should keep it from needing to access additional liquidity via debt or stock sales "well into 2017," according to ONEOK CEO Terry Spencer. 

Less than two weeks following this announcement, ONEOK declared its quarterly dividend for the fourth quarter, of $0.615 per share, the same level it paid in the third quarter and a small 2% bump from the year before. In the dividend announcement, Spencer reiterated ONEOK's commitment to maintaining its dividend:

In line with our recently announced financial guidance, we're sustaining ONEOK's current dividend and underscoring our expectation to continue to do so throughout 2016. Despite a challenging environment, we expect to maintain substantial excess dividend coverage in 2016 and remain in a position to provide value to shareholders while continuing to make prudent financial decisions.

On the short- and long-term fronts, the company's exposure to commodity prices -- specifically natural gas liquids in ONEOK Partners' NGL gathering operations -- has been the weak spot, with NGL prices falling even more than oil and natural gas over the past year-plus. 

But the company has taken major strides to address this, going back as far as early 2015, renegotiating gathering and other commodity-based contracts as they expired and replacing them with more fixed-fee agreements to lock in predictable cash flows. The downside of these restructured contracts is that it reduces the upside when NGL prices recover, but giving up that upside and getting a rate of return that supports the company's expenses while providing adequate profits is probably the smart move for now and in the future. 

Now what: Frankly, this really looks like an opportunity to buy ONEOK.

With today's price drop, ONEOK is on track to pay a 12% yield, based on its current dividend rate, which management seems absolutely determined to support at the current level, and has pretty strong balance sheet and cash flows to maintain it. Furthermore, the gathering contract improvements at ONEOK Partners are paying off with better cash flows, and it looks like that should be a steady trend going forward. 

However, I'm a little less bullish about ONEOK Partners maintaining its current $0.79-per-quarter distribution, which would yield nearly 13% based on today's ONEOK Partners unit price. Management has said that it is expecting ONEOK Partners to attain a 1.0 or better coverage ratio (the ratio of earnings versus dividends paid out) in the fourth quarter and in 2016, but nobody has said that it will maintain the current payout. 

And since cutting the payout is one way to get the coverage ratio to 1.0 or better, I'm reticent to call ONEOK Partners' payout anywhere as secure as ONEOK's. 

Yes, ONEOK's only source of income is ONEOK Partners, so a distribution cut at ONEOK Partners would reduce cash flows to ONEOK. But ONEOK also gets its incentive distribution rights as the general partner of ONEOK Partners and doesn't pay out all of its earnings in dividends, so it has a wider margin of safety to support its own dividend, even if it had to cut payouts at ONEOK Partners. 

Put it all together and both are probably good buys at this point, but between the two, ONEOK feels like a safer bet, especially for income investors. That's not the same as risk-free, however. Expect these two to continue to move up and down a lot while energy markets roil, but ONEOK especially should make for a great long-term investment.