Cleaner string handling & empty url request protection

This patch creates a cleaner std::string usage by using empty() method and default constructor.

Also checked for empty url strings to avoid server errors crashes