There was a topic with the following hasType proc you can check out. Here is
how I use it to check if a variable is of type int
The macro that calls that proc **must** be a **typed** macro. If you want to
call from an **untyped** macro it will need to call the typed macro that will
call the hasType proc
proc hasType(x: NimNode, t: static[string]): bool {. compileTime .} =
## Compile-time type checking
sameType(x, bindSym(t))
proc isInt(x: NimNode): bool {. compileTime .} =
## Compile-time type checking
hasType(x, "int")