avoid crash on empty object