Check if $body is traversable before recursively sanitizing

Fixes issue caused by bd4975c for Issue #28.