Add a hasAnnotation convenience method.