How to check if irecv got a message?

say I have:

t = tensor.torch(0)
req = dist.irecv(t, rank)

how can i check if i have messages from some rank (stored in buffer or something). From c++ examples ive seen there are probe commands:

MPI_Probe(0, 0, MPI_COMM_WORLD, &status);

to check message length.
One possible solution would be to check if tensor != 0 but that doesnt seem to be the right way to do it