Since Heaven is meant to run on ruby 2+, you could replace all these calls with `custom_payload_config.to_h["before_deploy"]` (as `nil.to_h` returns an empty Hash).

Even better, since you want these to be arrays, and they should default to an empty array, you could write all these like so:

``` ruby
custom_payload_config.to_h.fetch("before_deploy", [])
```