Adding isEmpty method to the Queue and Stack classes.