fixed type on _isValidCommand