Return null when no port is available.