Changing the check resource type function