When natural disasters strike, many corporate giants rise to the occasion, offering help and condolences, while others unveil a truly ugly side.

Heading into the long days of hurricane recovery, it's wise to know which type of company you're patronizing.

Let's compare how several key players responded after Hurricanes Irma and Harvey devastated primarily parts of Puerto Rico, southern Florida and Houston in the U.S.

Starbucks Corp. (SBUX)  employees in the affected areas were paid, whether or not they were able to work. CEO Kevin Johnson said in a statement on Monday, Sept. 11, that the coffee king closed more than 400 stores before Harvey hit and more than 700 before Irma to ensure its employees' safety. Some 15,600 employees were impacted, he added. 

Before and during the hurricanes, Johnson said Starbucks' main priority was ensuring its employees "prepare themselves and their families" for the storms.

On the other end of the spectrum, employees at a Yum! Brands Inc.'s (YUM) Pizza Hut in Jacksonville, Fla., were threatened with losing their jobs if they didn't show up to work as Irma was approaching. That edict came from the store's manager.

"As a general rule of thumb, we close stores 6-12 hours before storm hits. Or night before if a daytime storm...if evacuating, you have a 24-hour period before storm 'grace period' to not be scheduled. You cannot evacuate Friday for a Tuesday storm event! Failure to show for these shifts, regardless of reason, will be considered a no call / no show and documentation will be issued," the manager said in a letter to employees.

Pizza Hut condemned the manager's reaction.

Meanwhile, Walmart Stores Inc. (WMT) set the bar the highest, committing $30 million to assist in hurricane relief across Harvey- and Irma-affected areas. While not every company can donate such a large amount, as Walmart reaps nearly $500 billion in annual sales, everyone can take a page from the big-box retailer's ethics playbook.

Walmart spokesman Ragan Dickens told TheStreet on Thursday, Sept. 14, that a one-time "disaster displacement assistance" fund was set up for hurricane-impacted employees, allowing them to expense payments on the retailer's dime for filling up on gas or staying at a hotel for refuge, for example, "to get out of harm's way." Dickens declined to disclose the amount available to each employee.

While Walmart was monitoring the storm from its emergency center in Bentonville, Ark., sending, when safe, 1,700 truckloads of basics, mainly water, to Irma- and Harvey-stricken areas, several other companies took to price gouging.

State attorneys general are investigating thousands of cases of illegal price gouging after the hurricanes. Texas attorney general Ken Paxton accused, for example, a Robstown Enterprises Inc. Best Western hotel in Houston of tripling its normal room rate during Harvey; and an Encinal Fuel Stop, a Chevron Corp. (CVX)  station outside Laredo, allegedly was charging $8.99 to $9.99 per gallon for regular unleaded gas, far above the current average price there of $2.50.

Starbucks is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells SBUX ? Learn more now .

Read More of What's Trending on TheStreet:

More from Stocks

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Neel Kashkari: The Heart of Our Financial System Is More Radioactive Than Ever

Neel Kashkari: The Heart of Our Financial System Is More Radioactive Than Ever

Finding Stocks Right for You: Cramer's 'Mad Money' Recap (Friday 8/25/18)

Finding Stocks Right for You: Cramer's 'Mad Money' Recap (Friday 8/25/18)

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain