     super
 
   exec: (ctx) ->
-    val = @execArgs(ctx)
-    MAX_VALUES[val]
+    arg = @execArgs(ctx)
+    if (not arg?)
+      null
+    else
+      MAX_VALUES[arg]
 
 module.exports.Successor = class Successor extends Expression
   constructor: (json) ->
     super
 
   exec: (ctx) ->
-    MathUtil.successor @execArgs(ctx)
+    arg = @execArgs(ctx)
+    if (not arg?)
+      null
+    else
+      MathUtil.successor arg
 
 module.exports.Predecessor = class Predecessor extends  Expression
   constructor: (json) ->
     super
 
   exec: (ctx) ->
-    MathUtil.predecessor @execArgs(ctx)
+    arg = @execArgs(ctx)
+    if (not arg?)
+      null
+    else
+      MathUtil.predecessor arg

    super

  exec: (ctx) ->
    val = @execArgs(ctx)
    MIN_VALUES[val]

module.exports.MaxValue = class MaxValue extends Expression
  MAX_VALUES: "Integer" : MathUtil.MAX_INT_VALUE, "Real" :MathUtil. MAX_FLOAT_VALUE, "DateTime" : MathUtil.MAX_DATE_VALUE


  exec: (ctx) ->
    args = @execArgs(ctx)
    if (not args? || args.some (x) -> not x?)
      null
    else
      args?.reduce (x,y) ->
