code: private static <A extends Annotation> A getAnnotation(AnnotatedElement element, Class<A> annotationClass) {
          return (element != null) ? element.getAnnotation(annotationClass) : null;
      }
docs: Null safe annotation checker
  @param <A>
  @param element element or null
  @param annotationClass
  @return the annotation, if element is not null and the annotation is present. Otherwise null