Fix issue with target node check, make sure it isn't root/body, fixes #1...

...8222

This is a minor node check fix to avoid an error throw if a style call is made on document.