     this
 
   colorize: (colors, message) ->
-    return message if not @color or process?.env.NODE_ENV.toLowerCase() is 'production'
+    return message if not @color or process?.env.NODE_ENV?.toLowerCase() is 'production'
     colors  = colors.split ' '
     stylize = chalk
     stylize = stylize[color] for color in colors

    @level = options.level or DEFAULT.UNMUTED
    @types = options.types or DEFAULT.TYPES
    @transport = options.transport or DEFAULT.TRANSPORT
    @print = (options.print or DEFAULT.PRINT).bind(this, @transport)
    @messages = do =>
      messages = {}

        messages[type] = options.messages?[type] or []
        @[type] = @generateTypeMessage type if type isnt 'line'
      messages
    this

  push: (type, message) ->
