functions to check the elements are empty