[google-app-engine] Extract the url validate code to validate_url method