coerce the id argument to a number
fix passing a falsy panel to isCurrentPanel