allow 2nd argument to menu to be array or object