         set {
             if stringData != newValue {
                 
-                if newValue == nil {
-                    type = .tNIL
-                } else {
+                if let newValue = newValue {
                     // get size of encoded string
-                    if count(newValue!.utf8) > maxStringLength {
+                    if newValue.utf8.count > maxStringLength {
                         type = .tStringExternal
-                        
                     } else {
                         type = .tString
                     }
+                } else {
+                    type = .tNIL
                 }
                 
                 dirty = true

        if (!isNil) {
            switch (type) {
            case .tString:
                var stringDataUTF8 = stringData!.dataUsingEncoding(NSUTF8StringEncoding)
                
                if (stringDataUTF8 != nil) {
                    // println("\(stringDataUTF8!.length)")



@objc(property)
public class Property : GraphElement, Coding, SOCoding, NSCoding { // Equatable
    
    // measured by count(string.UTF8)
    let maxStringLength = 20
