Handle cases when attributes are null and empty