Factor out parsing sanitizer arguments to a separate function