 public func JSONConvertibleObjectsArrayValue <T: JSONObjectConvertible> (optional: AnyObject?) -> [T]? {
     if let raw: [JSONObject] = JSONObjectsArrayValue(optional) {
         var result: [T] = []
-        result.reserveCapacity(raw.underestimateCount())
+        result.reserveCapacity(raw.underestimatedCount)
         for el in raw {
             if let output: T = try? T(raw: el) {
                 result.append(output)


public func NonEmptyString(optionalValue: String?, trimWhitespace: Bool = true) -> String? {
    if let value = optionalValue {
        let trimmedValue: String = (trimWhitespace ? value.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) : value);
        if trimmedValue.isEmpty {
            return nil
        } else {

        } else if let v = value as? Int {
            return v != 0
        } else if let v = value as? String {
            let u = v.uppercased()
            if (u == "YES" || u == "TRUE" || u == "ON" || u == "Y" || u == "1") {
                return true
            } else if (u == "NO" || u == "FALSE" || u == "OFF" || u == "N" || u == "0") {
