fix bug in kvp2array

If no equal sign was in the passed value, a JS error would result. Added
a check to avoid that error.