check if window exists