`getScriptTypesForHook` actually returns `undefined` when there is no matching type. Why not just `(!scriptTypes)`