Minor fix for RDF resource checking -- simplified the code.