add a null check for AnnotatedField