* Check for NULL pointers before reading them.
* Code reformatting.