Your test `$2 ~ /./` is always true, except when `$2` is the empty string, ie when there is 0 or 1 field in the line. You should try `$2 ~ /^.$/`.
You can also combine the grep and awk into one:
awk '/^.M/ {print ($2 ~ /^.$/ ? $3 : $2)}'