Alternatively you can use ```try``` which essentially collapses the nil-check and the method, like this:

```ruby
if @user.try(:persisted?)
```