Null check when switching to non-Chrome/invalid window.