= new /obj(loc) // the variable is declared as a /mob, but we create an /obj
if(istype(my_atom))
// this will not pass, as the inferred type is different from the actual type
if(istype(my_atom, /obj))
// this will pass, as we are providing a second argument to test with, which matches the type
For testing paths, use ispath().