replace this loop with get(UriScheme) method and check it for nullity