Simplifying instances of scenes

I have a function that has conditional operator inside of Game_System that checks if the scene I am in currently is at Scene_Menu or Scene_Map. However, it is very natural that this code:

if(SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Menu) {}becomes impractical if I am about to check Scene_Item, Scene_Equip, Scene_Status, Scene_Save, Scene_Load and Scene_End. It would become long and adding the || everytime makes it even pedestrian when coded. Is there a way to simplify this?
You could make a separate function that will return true or false, like so:

function isSceneClass(scene, klasses) { for(var i = 0; i < klasses.length; i++) { if(scene instanceof window[klasses]) { return true; } } return false;}Make sure that klasses is an array, though, and it contains strings that are the same as the scene names.
- edit - 

It finally works. Thanks Zale, I added it on SceneManager instead 🙂

Original thread: https://forums.rpgmakerweb.com/threads/simplifying-instances-of-scenes.49960/