def parse_args(parser, args):
    """Wrapper around parse_args for the parser passed in as an argument, for doing input validation"""
    results = parser.parse_args(args)
    if results.type is None:
        raise ValueError('Type not specified')
    if results.input == (None,):
        raise ValueError('Input files not specified')
    if results.results == (None,):
        raise ValueError('Results files not specified')
    return results