This situation covered by documentation
Jul 29, 2017 · 1 min read
As it written there:
Any reference in Java may be null, which makes Kotlin’s requirements of strict null-safety impractical for objects coming from Java. Types of Java declarations are treated specially in Kotlin and called platform types. Null-checks are relaxed for such types, so that safety guarantees for them are the same as in Java
Gson is a Java library, that’s why situation you described isn’t surprise for those who read documentation carefully.
