Added validation for url and tests