Improved invalid command config key check