     typeChr: (_obj)->
       return '~' if _obj == null
       return '-' unless _obj?
+      return '>' if _obj instanceof Function
       _typeChr = (typeof _obj).slice(0,1)
       return _typeChr if @arrIncludes(@_builtinTypeChr,_typeChr)
       if _typeChr == 'o'
-        return 'a' if _obj.constructor == Array
+        return 'a' if _obj instanceof Array
+        return 'd' if _obj instanceof Date
         return 'h' if _obj.constructor == Object
-        return 'd' if _obj.constructor == Date
       return false
 
     baseStrToNum: (_str, _base)->

      's' # string
    ]

    getValueById: (_id)->
      COMM.Values.values[_id]

    ###
    # Returns object type as a single-char string.

      catch e
        console.log('_'+'decodeString failed for _'+'str: ',_str)
        return _str
    # Recursively merges two objects of identical structure (array or object)
    updateObject: (_src,_dst)->
      _typeSrc = @typeChr(_src)
      _typeDst = @typeChr(_dst)
      _merge = (_item,_src,_dst,i)=>
        _itemType = @typeChr(_item)
        if _itemType == @typeChr(_dst[i])
          if _itemType == 'a' or _itemType == 'h'
            @updateObjects( _item, _dst[i] )
          else
            _dst[i] = _item
        else if !@isProduction
          console.warn('updateObject; mismatching item type: ', _itemType, ' (', _item, ') vs ', @_typeChr(_dst[i]), ' (',_dst[i], ')')
      if _typeSrc == _typeDst
        if _typeSrc == 'a'
          for _item, i in _src
            _merge(_item,_src,_dst,i)
        else if _typeSrc == 'h'
          for i, _item of _src
            _itemType = @typeChr(_item)
            _merge(_itemType,_src,_dst,i)
    # Returns a decoded Array with the decoded content of Array _arr
    _decodeArr: (_arr)->
      _output = []
