Catch classcast and report as illegal argument