Should be check better if one of the values is undefined, not the two of the?