Change all property attributes to `readonly`.
Add NULL check.
Add sample code.