check if sec4 code is valid