cast undefined to empty string