def get_event_type(event):
    """Gets the event type

    `event` can either be a StripeEvent object or just a JSON dictionary
    """
    if type(event) == dict:
        event_type = event.get('type', None)
    else:
        event_type = event.type
    return event_type