Error checking and NOWDOC

Hi JP,

Thanks for posting this code! Great idea using Modernizr directly on the server side. I made a couple of cosmetic changes to the code. Feel free to ignore this pull request - I just figured I'd let you know just in case you like it. 

Cheers!
j