/proc/isloc(Loc1)
Usage:
isloc(Loc1, Loc2, ...)
Loc1: Any number of objects to test.
Returns:
num: 1 if all provided arguments are valid locs; 0 if any are not.

A valid loc is defined as being an /area, /turf, /obj or /mob. It can be thought of as being ifatom(), and works for any descendent of /atom, including user defined objects.