private OverlayTypesRewriter createOverlayRewriter(CompilationState compilationState) {
TypeOracle typeOracle = compilationState.getTypeOracle();
JClassType jsoType = typeOracle.findType(JsValueGlue.JSO_CLASS);
// If we couldn't find the JSO class, we don't need to do any rewrites.
return jsoType != null ? new OverlayTypesRewriter(compilationState, jsoType) : null;
}