Raise helpful errors when num workers is out of range