Every time I see people "deal" with this problem, it looks like this:
if (getAccount() != null &&
getAccount().getContact() != null &&
getAccount().getContact.getPhoneNumber() != null) {
// do something
}
// don't put an else condition in, just keep going and let the program
// produce the wrong result in a confusing way when it happens in production
I actually blame rampant code generation and an adamant refusal to even consider object-oriented design for this problem - this sort of case ought to be handled by something like: getAccount().callContact()
(or whatever you were going to do with the phone number when you got it). Insistence on generating code from SQL schemas or XML DTDs and then writing procedural code makes that pretty much impossible, though.