[trivial][Refactoring] Add Declaration::isField()

During the coding of #1687, I found this refactoring.