add null check for enclosing binary expression