```ruby
event[:type] = type.nil? ? 'event' : type
```