Fix bug in permit null parent for AnnotationCode API.