Is Reassigning false to primitive boolean a good use of ternary operator?

```
boolean a = false;

```

Way 1 :

```
a = object.isAllowed() != null ? object.isAllowed() : false;

```

Way 2 :

```
if(object.isAllowed() != null) {
    a = object.isAllowed();
}

```

Kindly suggest which is a better way and why?