avoid sprintf on undefined