Get "isHashComponent" in an other way

Reduced lines of code