One of the requirements for prayer is Purity. Impurities can be visible and invisible. Stool, urine, menstrual blood are all considered impurities thus must be removed before praying, either by a change of clothing or washing the clothes. There are some dispensations available i.e. hardship.
You should check your underwear and any other clothes you are wearing, before prayer, if you are even the simplest bit unsure. It is always best to be safe. If you are, however, absolutely sure that there are no impure substances in your clothing, there is no need to check.
Like any library, Islam Stack Exchange offers great information, but does not offer personalized advice or legal verdicts, and does not take the place of seeking such advice from your Mufti, Imam, or other trustworthy Counselor.