Google Script - Function to unmerge cells?

GAS has a method to unmerge cells but unfortunately there is no way to know which cells are merged. Some users have suggested a few workarounds, the one I prefer is described in this post: Split (break apart) merged table cells in google spreadsheet with an apps script

There is also an enhancement request and interesting suggestions mentioned in this post: How do I know if spreadsheet cells are merged using google apps script


My answer to this question will be "clear formatting" Option in Format menu.