Proper way to match a grain attribute