I try to display two custom attributes in the product view page but this attributes is not exist for all products. How I can check if current product contain one of this two attributes?
I use this code to get the attributes value:
<?php /* @escapeNotVerified */ echo $_product->getResource()->getAttribute('data_sheet')->getFrontend()->getValue($_product); ?>
<?php /* @escapeNotVerified */ echo $_product->getResource()->getAttribute('health_sheet')->getFrontend()->getValue($_product); ?>