declare 
  p person_type := person_type('aaa',
   address_type('sss','ccc','sss',11111),
   phones_varray_type(null,null,null));
  procedure display_person(p in person_type) is
  begin
    if (p is not null) then
      dbms_output.put_line('Name: ' || p.name);
      dbms_output.put_line('Street: ' || p.address.street);
      dbms_output.put_line('City: ' || p.address.city);
      dbms_output.put_line('State: ' || p.address.state);
      dbms_output.put_line('Zip: ' || p.address.zip);
      if (p.phones(1) is not null) then 
        dbms_output.put_line('Phone 1: ' || p.phones(1));
      end if;
      if (p.phones(2) is not null) then
        dbms_output.put_line('Phone 2: ' || p.phones(2));
      end if;
      if (p.phones(3) is not null) then
        dbms_output.put_line('Phone 3: ' || p.phones(3));
      end if;
    end if;
  end;
begin
  p.name := 'D. Maul';
  p.address.street := '123 Kenobi St.';
  p.address.city := 'Death Star';
  p.address.state := 'Tattoine';
  p.address.zip := '66666';
  p.phones(1) := '111-1234';
  p.phones(2) := '111-1235';
  p.phones(3) := null;
  display_person(p);
end;
/
show errors
