When I come up with a lick/melody, there always lingers that question of "Has this melody already been used?" Should I worry about it or is there a way to find out without too much hassle?
Are you widely distributing it? Is it possibly from a piece of music that still may be under copyright (link)? You could pay for a search or the advice of an entertainment attorney.
Otherwise, you might like to know just for your own understanding, but it probably isn't worth the effort, aside from maybe asking some experts. If you have an artist in mind, you could listen to their collected recordings. If it's only a few chords in the progression and you don't recognize it, it's probably not very identifiable.
You can do that only for recordings, not tunes.
For tunes you should officially register the tune to your name and claim your rights if by chance you notice someone other is using that. This can happen if the tune goes popular. If it doesn't go popular, then claiming and searching is also impractical.
For tracking recordings, I can suggest these services:
Yes, there are no exact way to find out if a tune is exist ant now, simply because there are too many songs and most of them contain a lot of notes. However, there are cases where small parts of your song matches other small parts of other songs.
To answer your question, if your song is a piano song you made, try searching it up in the piano melody search engine, called http://www.musipedia.org/. This website lets you input a song or melody into its search engine, and searches it depending on if you want rhythm or melody to be searched more. Keep in mind, it only works on piano songs as this website only contains these songs.
This website is great to see if your song matches or is close to another melody, as it will sort it from most likely match to least likely! I use it to check for common tunes and if my songs are close to others. Enjoy!
For copyright questions, one thing you could consider doing is searching for the tune on Peachnote.com to see if it exists in that database of 200,000 out of copyright musical sources (mostly classical). If it appears in there then you don't have to worry about whether it appears in an in copyright song because you'd be protected since it'd be derivative of a melody that has already passed into the public domain.