if `decl == nullptr`, this should crash, so for me you should check `decl` or use reference instead of pointer.