title: How to check whether a string is Base64 encoded or not
body: <p>I want to decode a Base64 encoded string, then store it in my database. If the input is not Base64 encoded, I need to throw an error.</p>
  
  <p>How can I check if a string is Base64 encoded?</p>