Add null-checks around getter/setter before using them.
clang static analyzer fixit.