# How to handle nulls in SNARL

**URL:** <https://community.stardog.com/t/how-to-handle-nulls-in-snarl/760>\
**Category:** Support\
**Created:** [January 9, 2018, 6:27pm UTC](https://community.stardog.com/t/how-to-handle-nulls-in-snarl/760 "2018-01-09T18:27:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [January 10, 2018, 5:36pm UTC](https://community.stardog.com/t/how-to-handle-nulls-in-snarl/760/2 "2018-01-10T17:36:27Z")

</div>

Hi and welcome!

You can implement a transaction listener to perform a task (such as logging) on transactions from the SNARL protocol. We have an example of this in our [examples repo](https://github.com/stardog-union/stardog-examples/tree/develop/examples/connectable).

`null` doesn't make sense as the object of a triple (or any element of a triple for that matter). We are actively re-working some of our RDF parsing such that this kind of error should be caught at compile time, however until then what you're doing is my recommendation.

If it's too "ugly," perhaps consider tweaking the `literal()` method to return an empty String when passed a null value? This is assuming you would want that data loaded at all.

---

_[View the full topic](https://community.stardog.com/t/how-to-handle-nulls-in-snarl/760)._
