| 
           exports.parseColor = function parseColor(val) {  | 
        
    
   
 
In parseColor we test if value is empty string or null, otherwise we continue to use resolveColor:
  if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
    return val;
  }
  if (/^[a-z]+$/i.test(val) && type === exports.TYPES.COLOR) {
    return val;
  }
  var res = resolveColor(val, {
    format: 'specifiedValue',
  }); 
If val is undefined, this will cause an error in resolveColor
We can prevent this by adding a test for undefined:
  if (typeof val === undefined || type === exports.TYPES.NULL_OR_EMPTY_STR) {
    return val;
  }