Adding check resource type to REST functions