made added method to NSString category a little more robust