add TrimOrDefault to avoid NREs