ECMS-4592: Exception when accessing to Trash

Fix description:
  - Check if the node is null before access its property