if( abs( $array[ 0 ] ) != 0 ) { # the absolut value of this scalar is not 0, so it's probably not a string }