Another way to express this differently in ruby would be to check for an intersection:
```irb
<%- f = [ false, :false, 'false', ''] -%
<%- if ( [directory['allow']] & f ) == [directory['allow']] -%>
```
We create an array `f` with all valid values for `false`. This way we can now short-circuit the check whether `directory['allow']` is set or not, since nil is not part of `f`. Witness:
```irb
irb(main):001:0> f = [ false, :false, 'false', '' ]
=> [false, :false, "false", ""]
irb(main):002:0> ( f & [directory['allow']]) == [directory['allow']]
NameError: undefined local variable or method `directory' for main:Object
        from (irb):2
        from /usr/bin/irb:12:in `<main>'
irb(main):004:0> directory = {}
=> {}
irb(main):005:0> ( f & [directory['allow']]) == [directory['allow']]
=> false
irb(main):008:0> directory = { 'allow' => false }
=> {"allow"=>false}
irb(main):009:0> ( f & [directory['allow']]) == [directory['allow']]
=> true
irb(main):010:0>
```
This other way to express the same intent may not necessarily be a better way ;)