Bugfix to stop exit when launching valueListDialog, due to unnecessary cast and check