added null check for objects without datastreams