Simple way to check the class name

Follow the comments here: https://github.com/getgrav/grav/commit/a6e951a4dcdd9f3c2755b6bc6b5b180f3acbfa6f