There's definitely a lot more than syntax - allowing objects to be null is a great example of a language design decision that has implications both in the syntax and the semantic.
These examples make it clear that while null safety improves code readability, it can also increase the robustness of your software. A single change in a condition or accidentally using a value outside of its null check in the Java example can easily lead to errors at runtime.
There's definitely a lot more than syntax - allowing objects to be null is a great example of a language design decision that has implications both in the syntax and the semantic.
Something like this in Kotlin...
would look like this in Java...
These examples make it clear that while null safety improves code readability, it can also increase the robustness of your software. A single change in a condition or accidentally using a value outside of its null check in the Java example can easily lead to errors at runtime.
This is why Java 8 introduced Optionals. It's not syntactic sugar so it's more verbose than the Kotlin example, but it does the same thing:
Oh nice! I clearly haven't used Java in a while; I do still think the elvis operator looks a bit cleaner though.
Oh man... now I cannot unsee Elvis in the "Elvis operator" :-D