Get attribute value in magento2

I am using an object manager to get the attribute value even though it’s not recommended. I am getting NULL in product-object which causing error “GetattributeText() on NULL”. Below is the code that so far I tried $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->get(‘Magento\Framework\Registry’)->registry(‘current_product’); echo gettype($product); $slot_break = $product->getAttributeText(‘choose_slot_break’); when I echo gettype it shows “NULLObject”.…