Add extra check for type