Those two checks have to be vice versa. First you have to check if the timeout for the download is not None.