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.
Serial formating of empty serials

Correctly pass through empty serials as empty, so they can later be
ignored.