Fix NoMethodError in is_object_in_range?