Added optimization for allowing handlers to know the type of element being parsed without double-check