     for funcCall in node.functions
       call = [ @deparse(funcCall[0]) ]
 
-      if funcCall[1]?.length
+      if funcCall[1] && funcCall[1].length
         call.push 'AS (' + (funcCall[1].map((def) => @deparse(def))).join(', ') + ')'
 
       funcs.push call.join(' ')


    throw new Error(type + " is not implemented") unless @[type]?

    @[type](node, context)

	# 0  AEXPR_OP,					/* normal operator */
	# 1  AEXPR_OP_ANY,				/* scalar op ANY (array) */
	# 2  AEXPR_OP_ALL,				/* scalar op ALL (array) */
	# 3  AEXPR_DISTINCT,				/* IS DISTINCT FROM - name must be "=" */
	# 4  AEXPR_NULLIF,				/* NULLIF - name must be "=" */
	# 5  AEXPR_OF,					/* IS [NOT] OF - name must be "=" or "<>" */
	# 6  AEXPR_IN,					/* [NOT] IN - name must be "=" or "<>" */
	# 7  AEXPR_LIKE,					/* [NOT] LIKE - name must be "~~" or "!~~" */
	# 8  AEXPR_ILIKE,				/* [NOT] ILIKE - name must be "~~*" or "!~~*" */
	# 9  AEXPR_SIMILAR,				/* [NOT] SIMILAR - name must be "~" or "!~" */
	# 10 AEXPR_BETWEEN,				/* name must be "BETWEEN" */
	# 11 AEXPR_NOT_BETWEEN,			/* name must be "NOT BETWEEN" */
	# 12 AEXPR_BETWEEN_SYM,			/* name must be "BETWEEN SYMMETRIC" */
	# 13 AEXPR_NOT_BETWEEN_SYM,		/* name must be "NOT BETWEEN SYMMETRIC" */
	# 14 AEXPR_PAREN					/* nameless dummy node for parentheses */

  'A_Expr': (node, context) ->
    output = []

      order.push (node.agg_order.map (node) => @deparse(node, context)).join(", ")

    call = []
    call.push "#{name}("
    call.push 'DISTINCT ' if node.agg_distinct

    # prepend variadic before the last parameter
    # SELECT CONCAT('|', VARIADIC ARRAY['1','2','3'])
    if node.func_variadic
      params[params.length - 1] = "VARIADIC #{params[params.length - 1]}"

    call.push params.join(', ')

