diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index ae27b9cc..019a257c 100755 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -1614,7 +1614,7 @@ def to_nquad(triple, graph_name=None): .replace('\"', '\\"')) quad += '"' + escaped + '"' if o['datatype'] == RDF_LANGSTRING: - if o['language']: + if o.get('language'): quad += '@' + o['language'] elif o['datatype'] != XSD_STRING: quad += '^^<' + o['datatype'] + '>'