/proc/isfile(File)
Arguments:
File: The potential file to check.
Returns:
num: 1 for a file; 0 if it is not.

This works for both resource files, and files retrieved via file().

var/my_resource = 'icons/turf.dmi'

if(isfile(my_resource))
    world.log << "It's true!"