> For the complete documentation index, see [llms.txt](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/fstoolkit.errorhandling/option/bindnull.md).

# bindNull

Namespace: `FsToolkit.ErrorHandling`

## Function Signature

```fsharp
('T -> 'nullableValue) -> 'T option -> 'nullableValue option
```

## Examples

### Example 1

```fsharp
open System

let userInput = Some 12
let toNullable<'T> x = Nullable x

Option.bindNull toNullable userInput
// Some 12
```

### Example 2

```fsharp
open System

let userInput : int option = None
let toNullable<'T> x = Nullable x

Option.bindNull toNullable userInput
// None
```

### Example 3

```fsharp
let userInput = Some 12
Option.bindNull string userInput
// Some "12"
```
