Javascript Check If An Object Is Empty