Object immutability

I dont understand,
even without ‘const’ keyword, x may be modified in some other thread, and there’s no pb with smart cast ?

fun bar(foo: Foo) {
    if (foo.x != null) {
        println(foo.x + 1) // here, it can cast even if x can be modified in another thread.
    }
}