guard against undefined string