Surprised that guard clauses weren't mentioned here yet, you could also write
``` if (account == null) { throw NoAccountException }
if (account.contact == null) { throw AccountWithoutContactException }
if (account.contact.phoneNumber == null) { throw ContactWithoutPhoneNumberException }
// do stuff here ```