How to check for custom_data for ingridients in custom recipe

Basically what i want is to check if an echo shard used in crafting recipe has custom data, and i don`t understand how to do it. I can already output an item with custom data as a crafting result, but i don't understand how to check if inputted item has custom data
Continue to help post