You get a problem due to
v_Last_Record := a_Fetch_Set.LAST;
FOR i IN 1 .. v_Last_Record
In case your cursor does not have rows bulk collect does not fill collection and a_Fetch_Set is empty. In this case LAST returns NULL. You should check this or use a_Fetch_Set.COUNT.