You did not say that the fields ALBUM and/or CATALOG # could be possibly not exist in your files, which you want to manipulate with the action script.
You can handle such erroneous case by using an appropriate Mp3tag Filter to not show such files, in order not to embed complex error handling into the scripting expressions.
Sure, it is always a point of view and how someone organizes the work process.
If there is enough time and machine capacity, then someone can do the same error checking on each file, that means, repeatedly doing the same on 10k or more files, when maybe only a few files have really the need to be checked.
It would be better to do a sort of pre processing in a first step, to divide the good ones from the bad ones, in order to prevent the good ones to be treated always as if they were bad ones.
That is the job of the Mp3tag Filter.
The good message which I read from your action script is, that you know how to use the Mp3tag toolbox and how you can help yourself, to reach a self defined goal.
The following scripting expression has embedded the needed error checking.
$if($and(%ALBUM%,%CATALOG #%),$if($eql($right(%ALBUM%,$len(' ['%CATALOG #%']')),' ['%CATALOG #%']'),%ALBUM%,%ALBUM%' ['%CATALOG #%']'),%ALBUM%)
You can write the expression into one action "Format value" and run it for the field ALBUM.
Only if the fields ALBUM and CATALOG # exist, then the content from the field CATALOG # will be concatenated, using a space character, at the right edge of the content of the field ALBUM.
If there exist already such a concatenation, then the field ALBUM will be left as is.
If the content of the field CATALOG # has been changed in the meantime, then a new catalog number string will be appended to the existing content of the field ALBUM. This results to repeated concatenations.
Therefore it is recommended, before applying the scripting expression, to copy the original content of the field ALBUM to a backup field, for example ORIG_ALBUM, and keep this backup field while the whole life time of the file.
A backup field makes it possible to always restore the original condition. Possibly changes of the catalog number can take place without further problems.
Using the value from field ORIG_ALBUM together with the new catalog number will give the combined new value to put into the field ALBUM.