Update imap.rb

checking if header is null