fixed type checking in function parameters (again).

changed error messages to match printError()