Improved Serial formating

Only use non-empty model names for generating a serial number. Do
not format and link a serial number if the serial number is not
sufficiently non-empty.