Check if 'data' is set before acessing it's properties. Refs #373