all other methods return null instead of throwing exception. as there is no method to check wether the stack has elements at all, pop cannot throw exception.