The only thing I can think of is that
$quest_id is not actually 1 at the time the scene is accessed. This calls check_complete on a quest you have not created goals for yet. Therefore, when doing the various @goal_min[id]>=@goal_max[id] checks, you're trying to compare nil >= nil, which then causes the error. You need to first check that the goals have been implemented before doing the comparisons, i.e.
Code:
!@goal_min[id].nil? && !@goal_max[id].nil?