# 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/1a1d16a73ad5da89c80d6276a9c9ad8af2ec33fd/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`