How to convert defaults so a number defaulted to NaN?

I’m new to Haxe and I’m trying to convert this as3 function to Haxe. What is the Haxe equivalent of:-

function test(value:Number = NaN):void

I tried:-

function test(value:Float = Math.NaN)

but I get:-

Parameter default value should be constant

and I tried:-

function test(value:Float = NaN)

and I get:-

Unknown identifer : NaN

How about something like:

function test(value:Null<Float> = null) {
   If (value == null)
      value = Math.NaN;

See Nullability - Haxe - The Cross-platform Toolkit