added handling for invalid urls

Hello

since handling for invalid URLs was missing, it was hard to use a settings.py <-> settings_dev.py setup for development as the tool was quitting with a exception.

Added a very simple check if the inputed value is a string, and if not, convert to a empty string.