check input if $workgroup is undef