In Objective C, one could do the following to check for strings:
if ([myString isEqualToString:@\"\"]) { NSLog(@\"m
public extension Swift.Optional { func nonEmptyValue(fallback: T) -> T { if let stringValue = self as? String, stringValue.isEmpty { return fallback } if let value = self as? T { return value } else { return fallback } } }