Add option to set optional protocol in uri validation

Can you improve these lines (75-77) such that we don't need the additional ```allowemptyprotocol``` option?
The ```allowemptyprotocol=true``` should be the same as ```protocol=false```.