add axis type check to stack()