Seems like we can extract the uri parse and valid schemes check as a method?