check for nil Body before closing