null-safe code detecting rdf format