[NGRINDER-710] Fix the port validation