added type validation to validate_json_params