No, they are not the same. Although in many cases they behave the same, there is a big difference that the first method evaluates the value, and the second just checks to see if the value is null.
You can see the difference with this example:
function test ( a:Object ):void { if ( a ) trace( "A" ); if ( a != null ) trace( "B" ); } test( false ); // B test( "" ); // B test( 0 ); // B test( true ); // A & B // ...
All values ββthat are evaluated as false will give different results.
source share