check if stack is nil