if vcardObj.photo[0].value is a string it is not needed to check whether for length as an empty string is a falsy value