more explicit int(port) check