Optimizing add_comment for fail and memory

If no comment, no need to create the uri string. So fail earlier, less memory/cpu used.
You can initiate a dict in that way. It saves one line in the code.
Merge pull request #9 from karlcow/master

Optimizing add_comment for fail and memory