Add some type checks in src/adapters/jquery-ui.js