check if image url is valid