updated logic of grocery list ingredient to remove the blank space if ingredient amount and type are null