Resiliency fix

Added if-guards when getting length of certain run_status fields. This is needed because they may be nil if the chef run fails early enough. And this causes the length call to thrown and exception.