Refactor Array check at the CommandService