To prevent lumps, make sure to whisk the flour or cornstarch into the liquid gradually and continuously. You can also strain the gravy if any lumps do form.