check for existence of fields[:rdf_type] before trying to set the type in the constructor of resource