I believe this would do what you want?

```ruby
if sa['htpasswd']
```