Yeah, unfortunately those messages are rarely enlightening. My best guess is that it's not recognizing one of the tags for some reason, but without being able to fiddle with it myself, it's hard to say.
What I would do at this juncture is start back with your original formula and change it one piece at a time, previewing at each stage to see where the error comes in. For instance, what happens if you just change Album Artist to Sort Album Artist, without introducing $IsNull into the equation.