Grammatically, there are various ways of describing what’s going on. One helpful set of terms is essential vs. nonessential. When the identifier makes sense in the sentence by itself, then the name is nonessential and you use a comma before it. Otherwise, no comma. That explains an exception to the only-thing-in-the-world rule: when the words “a,” “an” or “some,” or a number, come before the description or identification of a name, use a comma.
The Most Comma Mistakes