SceneManager gone wild!

It turned out I need to use in my JS's some conditional branches that checks what scene is currently loaded, so I thought it would be the best to use
Code:
SceneManager instanceof Scene_Map


However... running a game and calling above method always returns false.
I didn't modified in any way RPG_Scenes.js file
I didn't installed any plugins that alters SceneManager
I have proper order of Yanfly's plugin

Any ideas what the hell is going on?
SceneManager will never be an instance of Scene_Map. However, SceneManager._scene might be an instance of Scene_Map.

Code:
SceneManager._scene instanceof Scene_Map
Ups! My bad - now it's all OK.

Original thread: https://forums.rpgmakerweb.com/threads/scenemanager-gone-wild.124997/