Fix input params type checking and exceptions classes.