Because registration is optional, you would need to do additional research of trade sources to determine if the name is already "in use" in ways that would create a likelihood of confusion (i.e., trademark infringement).
A trademark is a word, symbol or design, or a combination of these, used to distinguish the goods or services of one person or organization from those of others in the marketplace. For a more detailed description read Trademarks explained.
Probably not of interest to you,. unless you are going international, the U.S. trademarks office has a registration search function, (although I am not familiar with those classes)
USPTO.gov
You can talk with the registration office about this they will help you about this matter.
I have selected a few names to be registered as a trademark for my product. My products falls under classes 30 and 31 of trademarks. But what i want to know is, HOW TO KNOW THAT A NAME IS ALREADY REGISTERED UNDER THAT CLASS??? Is there any kind of online service that can tell you that the name I selected is available for registration in that class or is taken by somebody else...