In a Google docs spreadsheet. If cells A1 & A2 are merged, is there a way to confirm they are merged, using google apps script?
There is a merge function in GAS
It's not possible to know that. There's already an issue opened regarding this, but it is quite old and has no activity. You should star it (to keep track of updates and kind of vote for it) and leave a comment to see if you can get some attention.
But what I do when I need to assure merged cells are as I want them is to break everything apart and merge again, just to be sure. Of course, this is not a solution, just an idea that might suit you as well.