Fix usage of empty()