As mentioned in the comments, both tests can be performed quite easily.
To test for the default monospace font, the expansion of the \f@family macro can be compared to the expansion of \ttdefault. Note that both macros differ in their prefixes (\long in this case), which is especially important when \ifx is used.
Testing for any monospace font can be done by filling two hboxes with a single character each, where either would have a different width in a proportional font, and comparing the boxes' widths afterwards. . and M seem reasonable choices to me.
The following code demonstrates the idea by defining tests \ifttdefault and \iftt:
\documentclass{article}
\makeatletter
\newcommand\ifttdefault{%
\edef\@tempa{\f@family}%
\edef\@tempb{\ttdefault}%
\ifx\@tempa\@tempb
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
}
\newcommand\iftt{%
\begingroup
\setbox0=\hbox{.}%
\setbox1=\hbox{M}%
\ifdim\wd0=\wd1
\expandafter\endgroup\expandafter\@firstoftwo
\else
\expandafter\endgroup\expandafter\@secondoftwo
\fi
}
\makeatother
\begin{document}
\frenchspacing
Default monospace font: \ifttdefault{yes}{no}\par
\texttt{Default monospace font: \ifttdefault{yes}{no}}\par
{\fontfamily{txtt}\selectfont Default monospace font: \ifttdefault{yes}{no}}\par
\medskip
Any monospace font: \iftt{yes}{no}\par
\texttt{Any monospace font: \iftt{yes}{no}}\par
{\fontfamily{txtt}\selectfont Any monospace font: \iftt{yes}{no}}\par
\end{document}

\noindent iiiiiiiiii.\\mmmmmmmmmm.inside yourdocumentenvironment and check if the width is the same. – koleygr Jul 13 '19 at 15:14