# IsNull()

> Determines whether this NavNode is empty of any information.

## Definition

* **Type:** Method
* **Namespace:** [Unity.AI.Navigation.LowLevel](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public readonly bool IsNull()
```

### Returns

| Type                                                          | Description                                                                                                                                                                                     |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) has been created empty and has never pointed to any node in the NavMesh, or `false` otherwise. |

### Remarks

A null [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) is the default value of the struct and represents the absence of a reference to any node. This is distinct from a [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) that once referenced a real node that has since been removed; in that case [NavNode.IsNull](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode/isnull.md) still returns false. Use [NavWorld.IsValid](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navworld/isvalid.md) to check whether a non-null node is currently active in the NavMesh.

### Examples

```csharp
using UnityEngine;
using Unity.AI.Navigation.LowLevel;

public class NavNodeIsNullExample : MonoBehaviour
{
    NavNode m_Stored;

    void Update()
    {
        // Default-initialized NavNode values are null until you assign one from a NavWorld query.
        if (m_Stored.IsNull())
        {
            using NavWorld world = NavWorld.GetDefaultWorld();
            NavLocation location = world.MapLocation(transform.position, Vector3.one, 0);
            if (world.IsValid(location))
                m_Stored = location.node;
        }
    }
}
```
