Tested top() function with empty stack