Fix NumberFormatException if port is saved as blank string

if you open the port option and click ok, it saves a blank string in
preferences and this gets loaded instead of using defaultPort so throws
the exception trying to convert "" to an int.