jobs/milestones.rb: added check to closed issues and milestones

This was triggering an error when one of those values were nil