nanstd for quantities