import * as t from '@babel/types' ; export function accessSafe ( obj , member ) { return t . logicalExpression ( '&&' , t . logicalExpression ( '&&' , t . binaryExpression ( '===' , t . unaryExpression ( 'typeof' , obj ) , t . stringLiteral ( 'object' ) ) , t . binaryExpression ( '!==' , obj , t . nullLiteral ( ) ) ) , t . memberExpression ( obj , t . identifier ( member ) , false ) ) ; }