Verify Contact page is enable or not using programmatically Magento 2.

Contact us page is Enable or not, Check using Programmatically way by Magento 2.

By Default from Admin panel, you can verify it by Stores -> Configuration -> Contacts tab.

Using Coding, You can verify by getting contacts section, group, and field id value and pass it to the scopeConfig Object of Magento\Store\Model\ScopeInterface.

contact/contact/enabled is the configuration value for contact us page.

Call function by,
$this->getContactUsEnabled() // true|false

The Result is always boolean. True or false based on admin panel settings.