# tryFrom

> **tryFrom**(`input`): [`PieceCID`](/reference/filoz/synapse-core/piece/classes/piececid/) \| `null`

Defined in: [packages/synapse-core/src/piece/parse.ts:52](https://github.com/FilOzone/synapse-sdk/blob/a025f71112a5cb0744a4faea8a3f85c0d444a58e/packages/synapse-core/src/piece/parse.ts#L52)

Construct a [PieceCID](/reference/filoz/synapse-core/piece/classes/piececid/) from any supported input, or `null` if the
input is null/undefined or fails validation.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | [`PieceCIDInput`](/reference/filoz/synapse-core/piece/type-aliases/piececidinput/) \| `null` \| `undefined` |

## Returns

[`PieceCID`](/reference/filoz/synapse-core/piece/classes/piececid/) \| `null`