Updated url protocol checker function.