Throw an exception if an event is created with a nil parameter.