check if thumEl exists before trim