Improved "checkParams" method.