Added error handling to popover check.

popover was returning the following error in my app:

Uncaught Error: SYNTAX_ERR: DOM Exception 12 ratchet.js:50