y_browser_emulation.c: Add checks for NULL and people forgetting to call the setup code.

I really have no idea why we didn't do this sooner.