RE-order the type checking in the defalte method