improved port value assertion