Using an is_ function to determine a proper data type
<?php $unknownvar = "asdf"; echo gettype ($unknownvar) . "<br />"; if (is_string ($unknownvar)){ echo "Is a string<br />"; } ?>