Bug fixing: raising error if no valid resource id is provided in check_resource