[FixRM #8350] - Fix undefined method 'body' error due to a timeout

Needs to check nil before using method 'body', see:
http://dev.metasploit.com/redmine/issues/8350