     }
   }
 
+  /// Returns the element value type, if all elements have the same type.
+  ///
+  /// The problem with `NSNumber` arrays is that they can contain mixed content, such as `[0.1, 2, true]`. Therefore,
+  /// we have to check the type of each element.
+  ///
+  /// - Parameter array: The value to describe
+  /// - Returns: `ValueType` case if array is uniform (`nil` otherwise)
   private static func elementValueType(for array: [NSNumber]) -> String? {
     let valueTypes = Set(array.map(valueType(for:)))
 

  /// for complex types (such as arrays and dictionaries), describing the type information of sub-elements (such as an
  /// array's element, or each of a dictionary's properties).
  ///
  /// Note: this is used for the Plist and YAML Stencil contexts
  ///
  /// - Parameter data: The value to describe
  /// - Returns: Dictionary with type information about the value (for Stencil context)
  static func generate(for data: Any) -> [String: Any] {
    let dataType = type(of: data)

    if data is String {
      return [Key.type: ValueType.string]
    } else if dataType == Bool.self {

      return [Key.type: ValueType.int]
    } else if dataType == Double.self {
      return [Key.type: ValueType.double]
    } else if data is Date {
      return [Key.type: ValueType.date]
    } else if data is Data {
      return [Key.type: ValueType.data]
    } else if let data = data as? NSNumber {
      return [Key.type: valueType(for: data)]
