Put this logic as overriding `likeCommand.canExecute` function, which should return a boolean.