Speed optimization: Only trim fields that might need trimming