Move to extractSafely to extract parameters from URIs