Fixed NoneType error when rendering the event form.