type checking in mul