Add is.window method to detect whether the window object

Add is.window method to detect whether the window object