peek call should also throw error if stack is empty