Logos DX
    Preparing search index...

    Function isNull

    • Checks if value is specifically null.

      Strict equality check for null values. More explicit than checking truthiness.

      Parameters

      • val: unknown

        value to check

      Returns val is null

      true if value is exactly null

      isNull(null) // true
      isNull(undefined) // false
      isNull('') // false
      isNull(0) // false

      const result = findUser(id);
      if (isNull(result)) {
      // User was explicitly not found
      }