added fullscreen detection

The try/catch will catch both security and null errors, but I can make it more explicit if you prefer.