The data is safe, because you can do additional logic in your getter / setter, and it's not possible to change the values of your variable. Imagine your code did not work with a null variable, so in your setter you can check against null values and assign a default value which is != null. So your code is still working, regardless of whether someone tries to set your variable to null.