Now checks for valid host and port names