Be more defensive for nil strings