How to check if a file is not found?

I just want to know how to check if a certain file is not found in your scene? For example, I created a sprite that shows a representation of my actor every time. I changed my actor and currently, I have no image that shows the actor's representation. Normally, it says in the console that such file is not found and an error message appears. However, I was wondering if there's a way to check if the current image needed is not found, so I can skip showing the sprite, if the image is found, display the image.


TIA.
You will throw an error, if you request a file that doesn't exist and there's nothing in the base scripts, that would prevent it. There has to be a different reason for your actor to be invisible.
Yeah it throws me an error because the bitmap isn't present. But I was wondering if there's a way to check if the bitmap is not present, so I can do bunch of stuff inside the true clause.
Well, if it throws an error when the file can't be found, just have a catch block to catch the error and handle it.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-if-a-file-is-not-found.55668/