Fix joining potentially undefined values