If an accused arraigned before a court-martial makes an irregular pleading, or enters a plea of guilty improvidently or through lack of understanding of its meaning and effect, or if he or she fails or refuses to plead, a plea of not guilty shall be entered in the record and the court shall proceed as though he or she had pleaded not guilty.