Vectorise hasCommand