i guess it should be 
```ruby
drop_database(sub_config) if sub_config.is_a?(Hash) && sub_config[:database]
```