Added check for url