When a property doesn't exist and you try to get its type or value, you get undefined. If you convert undefined to a Boolean (which is what an if/then statement does with the expression supplied as the condition), you get false because certain values are truthy and others are falsey.
So this is an explicit way of testing for not undefined:
if ( typeof user.account.products !== 'undefined') {}
And, this is an implicit way  of doing the same thing:
if (user.account.products)
Now your line:
if (user.account && user.account.hasOwnProperty('products'))
Is more specific than either of these because not only does it test to see if user.account exists, but it also tests to see if that object has its own products property. If it is that property you intend to use and there is a chance the user.account may not exist or that it may, but may not have products as a property, then this is the best way to test for it.
But, there are still other ways to do this kind of testing. This:
if(account in user && products in user.account)
Checks to see if the respective properties exist in their host object without regard to whether the properties are inherited or not.
But, in the end, if it is the products property you care about, all you really need is:
if(products in user.account);
This test will fail if products isn't there or it user.account isn't valid.
It all depends on how granular you want to test.
     
    
user.accountdoesn't exist.(typeof a === undefined)would tell you that the result oftypeofisundefined, which would be a major problem. The correct comparison fortypeofIS(typeof a === 'undefined'). Now, see below for the answer to your question of which is better.