checkParallelArguments function

Helper function to check the that the parallel arguments are valid