Checks whether the current event is of the specified type. If the event is of the specified type, returns it and moves to the next event. Otherwise retruns null.
public T? Allow<T>() where T : ParsingEvent