Bug 950821 - Properly check for undefined value when prefilling spans