Check that Tasks is not nil before accessing it.