added a more robust if statement for when executegetwid sends back an empty return