Added condition to check that port number System preference is a number.