check that stock exists before buying or selling