Added parameter type validation for methods