check WindowManager is undefined or not here.