Move SSD apply truth checks to typed Kotlin

ober

8157f1cc4eb65569f68249cd04162ddab839fb9a

diff --git a/templates/ssd-review.ss b/templates/ssd-review.ss
index d2bab0e..7ac6c2e 100644
--- a/templates/ssd-review.ss
+++ b/templates/ssd-review.ss
@@ -8645,8 +8645,9 @@
        "    }"
        ""
 	       "    fun applyTruth(session: SsdSession) {"
-	       "        val truth = loadTruth(session) ?: return"
-	       "        applyTruthJsonToSession(session, truth)"
+	       "        val truth = loadTruth(session)"
+	       "        if (!truthPresent(truth)) return"
+	       "        applyTruthJsonToSession(session, truthJsonObjectOrEmpty(truth))"
 	       "    }"
        ""
        "    private class LimitedInputStream(input: InputStream, private val limit: Long) : FilterInputStream(input) {"