/proc/ispath(Val, Type)
Usage:
ispath(Val)
ispath(Val, Type)
Val: A type path.
Type: A type path or instance.
Returns:
num:
If Type is provided: 1 if Val is a typepath derived from Type; 0 if it is not.
If Type is not provided, 1 if Val is a typepath; 0 if is not.
var/what_thing = /mob/player

if(ispath(what_thing))
    world.log << "it's a path..."

if(ispath(what_thing, /mob))
    world.log << "it's some kind of mob..."

if(ispath(what_thing, /mob/player))
    world.log << "it's a player!"

See also: