Use code for this.
Don’t make a comment saying a variable should be a certain type. Although the statement is true, this will lead to bugs when the “rule” is violated.
Enforce rules with types, objects, assertions, logic, and other code constructs. Make the code work at validating itself.
Note this doesn’t apply to some annotations, these actually work. These are a special kind of comment that gets read by the preprocessor and turned into code.