(The overload in Library.kt of) toString() is defined as fun Any?.toString(): String. So it will convert any type to a String.
If you add the question mark before toString(), you are telling Kotlin to not invoke it if the value is null. If the value is null, the result of nothing?.toString() will also be null.