# How to know whether there's an Boolean arg passed in? function test(val:Boolean = ?)

**URL:** https://forum.kirupa.com/t/how-to-know-whether-theres-an-boolean-arg-passed-in-function-test-val-boolean/287542
**Category:** Uncategorized
**Created:** [May 3, 2009, 10:46am UTC](https://forum.kirupa.com/t/how-to-know-whether-theres-an-boolean-arg-passed-in-function-test-val-boolean/287542 "2009-05-03T10:46:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![zhangxiaorui](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zhangxiaorui](https://forum.kirupa.com/u/zhangxiaorui)
#### Post date: [May 3, 2009, 10:46am UTC](https://forum.kirupa.com/t/how-to-know-whether-theres-an-boolean-arg-passed-in-function-test-val-boolean/287542/1 "2009-05-03T10:46:01Z")

</div>

using:

```auto
function test(val:String = null):void {

}

//would easily know whether there's a string passed in:

test(); // No string passed in
test("1"); // Found string passed in

```

using:

```auto
function test(val:Boolean = null):void {
  
}

```

is not working. in this case, I want the function know whether there’s a boolean arg passed in.
