TransUnion on credit scores and the myth about closing accounts

On a page actually titled “Credit Myths and Misconceptions,” TransUnion states this:
Credit myths and credit misconceptions are plentiful. Don’t let incorrect information influence your credit behavior. Some of the most common credit myths are…

It helps to close old accounts.
This credit myth advocates closing old and inactive accounts to hike up your score. However, this might inadvertently have the opposite affect and lower your credit score because now the credit history appears shorter.

However, credit score expert John Ulzheimer discusses closing accounts with a reader saying, “You’ve identified what I believe is the 2nd most common myth in credit scoring, right behind ‘employers using credit scores.’”