Attach type and origType only when needed.