test if li element is defined before calling pos_phone or pos_default functions to avoid undefined error when resizing the window.