Method for safe getting property in angularjs/lodash
<p>I have following code:</p>

<pre><code>return _.map(_.compact([
                $scope.status() ? false : "status",
                ($scope.evidenceLevel || {}).id ? false : "evidence_level",
                ($scope.association || {}).id ? false : "association",
                $scope.predictiveStatement ? false : "predictive_statement",
                $scope.evidenceStatement ? false : "evidence_statement",
                ($scope.hasIncludedReference() || isReferred()) ? false : "reference"
            ]), myFunction);
</code></pre>

<p>Sonarqube thinks that this method too complicated (complexity is 11, max allowed is 10), is there any standard function for such code - ($scope.association || {}).id?</p>