Response to @Vishwas G (not a comment because code blocks aren't supported in comments):
As Daniel pointed out, if the object "a" in your example doesn't exist in the first place, your attempt to access "b" on "a" will cause an error. This happens in cases where you're expecting a deep structure, such as a JSON object that might, for example, have the format "content.social.avatar". If "social" doesn't exist, then attempting to access "content.social.avatar" will cause an error.
Here's a general-case example of a deep-structure property-existence test where the "undefined" approach can cause an error in cases where the "hasOwnProperty()" approach does not:
// Missing property "c". This is the "invalid data" case.
var test1:Object = { a:{b:"hello"}};
// Has property "c". This is the "valid data" case.
var test2:Object = { a:{b:{c:"world"}}};
Now the tests...
// ** Error ** (Because "b" is a String, not a dynamic
// object, so ActionScript's type checker generates an error.)
trace(test1.a.b.c);
// Outputs: world
trace(test2.a.b.c);
// ** Error **. (Because although "b" exists, there's no "c" in "b".)
trace(test1.a && test1.a.b && test1.a.b.c);
// Outputs: world
trace(test2.a && test2.a.b && test2.a.b.c);
// Outputs: false. (Notice, no error here. Compare with the previous
// misguided existence-test attempt, which generated an error.)
trace(test1.hasOwnProperty("a") && test1.a.hasOwnProperty("b") && test1.a.b.hasOwnProperty("c"));
// Outputs: true
trace(test2.hasOwnProperty("a") && test2.a.hasOwnProperty("b") && test2.a.b.hasOwnProperty("c"));
Note that ActionScript's sibling language JavaScript would not generate an error in the test1 example. However, if you extend the object hierarchy one more level, you'll bump into errors in JavaScript too:
// ** Error (even in JavaScript) ** because "c" doesn't even exist, so
// test1.a.b.c.d becomes an attempt to access a property on undefined,
// which always yields an error.
alert(test1.a.b.c.d)
// JavaScript: Uncaught TypeError: Cannot read property 'd' of undefined