Add null check for the list of attributes on a service element