new function check if object is empty