Walltop Sentries's triggered ability checks if there is a Lesson card in your graveyard when it is put on the stack and again when it goes to resolve. If there is no Lesson card in your graveyard when Walltop Sentries dies, the ability will not be put on the stack at all.