Refactor isX annotation type check