What we're dealing with here is the beginning sound of the word. M, of course, is a consonant, but when we say the letter, the initial sound is a vowel (emmm). Which to use when writing is up to the individual. I would us an because I would expect the reader to say emm, bee, ay, rather...