Checking invalid base64 chars - thanks @cyli