Get node bundle (content type) from EntityInterface trying to find if node is bundle article (node bundle = content type) before executing the rest of the statements in the following example 

I can test if the entity is node but I can't figure out how to test if content type is article

&lt;?php

use \Drupal\Core\Entity\EntityInterface;

function MODULE_NAME_entity_presave(EntityInterface $entity){

    //if content type is article 
    if ($entity-&gt;getEntityType()-&gt;id() == 'node') {  
        //do wonderful stuff ...
    }
}
I did manage to find it after all $entity-&gt;bundle() it was pretty easy ...

 if ($entity-&gt;getEntityType()-&gt;id() == 'node' &amp;&amp; $entity-&gt;bundle() == 'article') {