A function to check whether an object has class dagitty.
dagitty
is.dagitty(x)
x
object to be tested.