If you don't mind the overhead of the pgfmath parser you can parse the number and check \ifpgfmathunitsdeclared. This is true if a TeX unit is specified at any point in the expression, or if the expression contains something that TeX regards has having units, such as skip, and box dimensions.
\documentclass[border=0.125cm]{standalone}
\usepackage{pgfmath,pgffor}
\parindent0pt
\def\print#1{\expandafter\Print#1@}
\def\Print#1{\if#1@\else\string#1\relax\expandafter\Print\fi}
\begin{document}
\newcount\mycount
\newdimen\mydimen
\newskip\myskip
\mycount=1
\mydimen=1pt
\myskip=1pt plus 1pt
\newbox\mybox
\setbox\mybox=\hbox{1}
\begin{minipage}{3in}
\foreach \value in {1, 1.0, 1e0, sin(1), 1cm, 1pt, 1mm, 1sp, 1mu, sin(1pt), 1+1pt,
\mycount, \mydimen, \myskip, \wd\mybox, \mycount+1pt, width("1")}{%
\pgfmathparse{\value}
Expression \hbox to 2.5cm{\hfill`{\tt\print\value}'}
\ifpgfmathunitsdeclared
\emph{\bfseries has} a unit
\else
has no units
\fi
}
\end{minipage}
\end{document}

It's also worth noting that there is a macro \pgfmathpostparse which is executed after the parser has finished but just before it exits in which further stuff an be done. Initially it is set to \relax but is advisable to check its value in case some library or other package changes it.
The result of the parse will be in \pgfmathresult and it is possible to change it (if one really wanted to). It is however still inside a TeX group so \global must be used if the result of some test is required.
The following example using a crude integer test is not great as the parser rarely returns integers (there are a few exceptions shown below) but illustrates how it can be used.
\documentclass[border=0.125cm]{standalone}
\usepackage{pgfmath,pgffor}
\parindent0pt
\makeatletter
\newif\ifpgfmathresultinteger
\def\pgfmathpostparse{%
\expandafter\pgfutil@in@\expandafter.\expandafter{\pgfmathresult}%
\ifpgfutil@in@%
\global\pgfmathresultintegerfalse%
\else%
\global\pgfmathresultintegertrue%
\fi%
}
\def\print#1{\expandafter\Print#1@}
\def\Print#1{\if#1@\else\string#1\relax\expandafter\Print\fi}
\begin{document}
\newcount\mycount
\newdimen\mydimen
\mycount=1
\mydimen=1pt
\begin{minipage}{3.5in}
\foreach \value in {1, int(1.0), \mycount, \mydimen, int(\mydimen+1pt), \mycount+1pt}{%
\pgfmathparse{\value}
Parsing \hbox to 3.5cm{\hfill`{\tt\print\value}'}
does
\ifpgfmathresultinteger
\else
\emph{\bfseries not}
\fi
give an integer
}
\end{minipage}
\end{document}

#1is? Or is it just an example? – percusse Oct 14 '13 at 06:45