How to check if an instance is of type String or GString in Groovy July 25, 2023 by Tarik Instanceof tests should work: assert "fasd" instanceof String assert "${this}" instanceof GString