allow state_duration to be nil in alert.rb