Fix ROOT-5521 Assert occourring with rootcling

In Clang, a NamedDecl inherits from a Decl.
The llvm::cast resulted in an assert when
 1) Debug mode was active (LLVMDEV=1)
 2) An llvm::cast of a Decl into a NamedDecl was tried
To cope with this problem, a check with llvm::isa was put in place.