Checking hasattr befor accessing S3_URL setting